netfilter-devel.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 02/04: nf_ct_dccp: add missing DCCP protocol changes in event cache
Date: Wed, 27 May 2009 16:35:27 +0200 (MEST)	[thread overview]
Message-ID: <20090527143525.4649.25643.sendpatchset@x2.localnet> (raw)
In-Reply-To: <20090527143521.4649.73610.sendpatchset@x2.localnet>

commit b38b1f616867c832301f24eaf259889494d495b3
Author: Pablo Neira Ayuso <Pablo Neira Ayuso>
Date:   Mon May 25 17:29:43 2009 +0200

    netfilter: nf_ct_dccp: add missing DCCP protocol changes in event cache
    
    This patch adds the missing protocol state-change event reporting
    for DCCP.
    
    $ sudo conntrack -E
        [NEW] dccp     33 240 src=192.168.0.2 dst=192.168.1.2 sport=57040 dport=5001 [UNREPLIED] src=192.168.1.2 dst=192.168.1.100 sport=5001 dport=57040
    
    With this patch:
    
    $ sudo conntrack -E
        [NEW] dccp     33 240 REQUEST src=192.168.0.2 dst=192.168.1.2 sport=57040 dport=5001 [UNREPLIED] src=192.168.1.2 dst=192.168.1.100 sport=5001 dport=57040
    
    Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
    Signed-off-by: Patrick McHardy <kaber@trash.net>

diff --git a/net/netfilter/nf_conntrack_proto_dccp.c b/net/netfilter/nf_conntrack_proto_dccp.c
index 8e757dd..aee0d6b 100644
--- a/net/netfilter/nf_conntrack_proto_dccp.c
+++ b/net/netfilter/nf_conntrack_proto_dccp.c
@@ -22,6 +22,7 @@
 #include <linux/netfilter/nfnetlink_conntrack.h>
 #include <net/netfilter/nf_conntrack.h>
 #include <net/netfilter/nf_conntrack_l4proto.h>
+#include <net/netfilter/nf_conntrack_ecache.h>
 #include <net/netfilter/nf_log.h>
 
 static DEFINE_RWLOCK(dccp_lock);
@@ -553,6 +554,9 @@ static int dccp_packet(struct nf_conn *ct, const struct sk_buff *skb,
 	ct->proto.dccp.state = new_state;
 	write_unlock_bh(&dccp_lock);
 
+	if (new_state != old_state)
+		nf_conntrack_event_cache(IPCT_PROTOINFO, ct);
+
 	dn = dccp_pernet(net);
 	nf_ct_refresh_acct(ct, ctinfo, skb, dn->dccp_timeout[new_state]);
 

  parent reply	other threads:[~2009-05-27 14:35 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-27 14:35 netfilter 00/04: netfilter fixes Patrick McHardy
2009-05-27 14:35 ` netfilter 01/04: nf_ct_tcp: fix accepting invalid RST segments Patrick McHardy
2009-05-27 14:35 ` Patrick McHardy [this message]
2009-05-27 14:35 ` netfilter 03/04: xt_hashlimit does a wrong SEQ_SKIP Patrick McHardy
2009-05-27 14:35 ` netfilter 04/04: nfnetlink_log: fix wrong skbuff size calculation Patrick McHardy
2009-05-27 22:52 ` netfilter 00/04: netfilter fixes David Miller
2009-05-28 16:34   ` Patrick McHardy

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=20090527143525.4649.25643.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).