netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Patrick McHardy <kaber@trash.net>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, Patrick McHardy <kaber@trash.net>,
	netfilter-devel@vger.kernel.org
Subject: netfilter 04/06: nf_conntrack: don't try to deliver events for untracked connections
Date: Tue, 24 Feb 2009 15:52:49 +0100 (MET)	[thread overview]
Message-ID: <20090224145248.9789.33395.sendpatchset@x2.localnet> (raw)
In-Reply-To: <20090224145243.9789.60678.sendpatchset@x2.localnet>

commit 5962fc6d5fff09c8e6fb8cadcb18327a0f4277f7
Author: Patrick McHardy <kaber@trash.net>
Date:   Wed Feb 18 15:30:34 2009 +0100

    netfilter: nf_conntrack: don't try to deliver events for untracked connections
    
    The untracked conntrack actually does usually have events marked for
    delivery as its not special-cased in that part of the code. Skip the
    actual delivery since it impacts performance noticeably.
    
    Signed-off-by: Patrick McHardy <kaber@trash.net>

diff --git a/include/net/netfilter/nf_conntrack_core.h b/include/net/netfilter/nf_conntrack_core.h
index e78afe7..c25068e 100644
--- a/include/net/netfilter/nf_conntrack_core.h
+++ b/include/net/netfilter/nf_conntrack_core.h
@@ -59,7 +59,7 @@ static inline int nf_conntrack_confirm(struct sk_buff *skb)
 	struct nf_conn *ct = (struct nf_conn *)skb->nfct;
 	int ret = NF_ACCEPT;
 
-	if (ct) {
+	if (ct && ct != &nf_conntrack_untracked) {
 		if (!nf_ct_is_confirmed(ct) && !nf_ct_is_dying(ct))
 			ret = __nf_conntrack_confirm(skb);
 		nf_ct_deliver_cached_events(ct);

  parent reply	other threads:[~2009-02-24 14:52 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-24 14:52 netfilter 00/06: netfilter fixes Patrick McHardy
2009-02-24 14:52 ` netfilter 01/06: nf_conntrack_ipv6: fix nf_log_packet message in icmpv6 conntrack Patrick McHardy
2009-02-24 14:52 ` netfilter 02/06: nfnetlink_log: fix per-rule qthreshold override Patrick McHardy
2009-02-24 14:52 ` netfilter 03/06: nfnetlink_log: fix timeout handling Patrick McHardy
2009-02-24 14:52 ` Patrick McHardy [this message]
2009-02-24 14:52 ` netfilter 05/06: make proc/net/ip* print names from foreign NFPROTO Patrick McHardy
2009-02-24 14:52 ` netfilter 06/06: xt_recent: fix proc-file addition/removal of IPv4 addresses Patrick McHardy
2009-02-24 21:50 ` netfilter 00/06: netfilter fixes David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090224145248.9789.33395.sendpatchset@x2.localnet \
    --to=kaber@trash.net \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=netfilter-devel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).