netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] conntrack event missing TCP protoinfo
@ 2009-12-31 13:03 Rui Sousa
  2009-12-31 18:09 ` Pablo Neira Ayuso
  0 siblings, 1 reply; 5+ messages in thread
From: Rui Sousa @ 2009-12-31 13:03 UTC (permalink / raw)
  To: netfilter-devel

Hi all,

Under some conditions it's possible to send a conntrack netlink event to 
userspace which is missing the TCP connection state 
(CDA_PROTOINFO_TCP_STATE) even though it is well defined.
This one liner should fix the problem. What do you think?

Br,
Rui

diff --git a/net/netfilter/nf_conntrack_proto_tcp.c b/net/netfilter/nf_conntrack_proto_tcp.c
index 3c96437..a514f5f 100644
--- a/net/netfilter/nf_conntrack_proto_tcp.c
+++ b/net/netfilter/nf_conntrack_proto_tcp.c
@@ -1045,6 +1045,7 @@ static int tcp_packet(struct nf_conn *ct,
 		   after SYN_RECV or a valid answer for a picked up
 		   connection. */
 		set_bit(IPS_ASSURED_BIT, &ct->status);
+		nf_conntrack_event_cache(IPCT_PROTOINFO, ct);
 		nf_conntrack_event_cache(IPCT_STATUS, ct);
 	}
 	nf_ct_refresh_acct(ct, ctinfo, skb, timeout);

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2010-01-05 20:39 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-31 13:03 [PATCH] conntrack event missing TCP protoinfo Rui Sousa
2009-12-31 18:09 ` Pablo Neira Ayuso
2010-01-04 18:03   ` Rui Sousa
2010-01-05 19:19     ` Pablo Neira Ayuso
2010-01-05 20:39       ` Pablo Neira Ayuso

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