ip_conntrack: Update event cache when status changes
Subsystems (3)
PATCH 1/1 ip_conntrack: Update event cache when status changes
Hi Dave!
While preparing the first release of libnfnetlink, libnfnetlink_conntrack and the "conntrack" userspace program, I found out that some events are never generated within the kernel. Please apply the patch below, thans.
[NETFILTER] ip_conntrack: Update event cache when status changes
The GRE, SCTP and TCP protocol helpers did not call ip_conntrack_event_cache() when updating ct->status. This patch adds the respective calls.
---
commit 1699521ab4e23ba4dd9f8bdd894393b8e109fe43
tree 2e0e4becf37fc85de0206eb7d381c3d849075ce8
parent 5a9087bd9bf78e3ca131a84a8eed06d6c31396dc
author Harald Welte <[email protected]> Sat, 24 Sep 2005 20:47:41 +0200 committer Harald Welte <[email protected]> Sat, 24 Sep 2005 20:47:41 +0200
net/ipv4/netfilter/ip_conntrack_proto_gre.c | 1 + net/ipv4/netfilter/ip_conntrack_proto_sctp.c | 1 + net/ipv4/netfilter/ip_conntrack_proto_tcp.c | 3 ++- 3 files changed, 4 insertions(+), 1 deletions(-)
net/ipv4/netfilter/ip_conntrack_proto_gre.c +1 -0
@@ -247,6 +247,7 @@ static int gre_packet(struct ip_conntrac ct->proto.gre.stream_timeout);/* Also, more likely to be important, and not a probe. */ set_bit (IPS_ASSURED_BIT , &ct->status); +ip_conntrack_event_cache (IPCT_STATUS , skb); }else ip_ct_refresh_acct (ct, conntrackinfo, skb, ct->proto.gre.timeout);
net/ipv4/netfilter/ip_conntrack_proto_sctp.c +1 -0
@@ -416,6 +416,7 @@ static int sctp_packet(struct ip_conntra && newconntrack == SCTP_CONNTRACK_ESTABLISHED) {DEBUGP ("Setting assured bit\n" );set_bit (IPS_ASSURED_BIT , &conntrack->status); +ip_conntrack_event_cache (IPCT_STATUS , skb); }return NF_ACCEPT ;
net/ipv4/netfilter/ip_conntrack_proto_tcp.c +2 -1
@@ -1014,7 +1014,8 @@ static int tcp_packet(struct ip_conntrac/* Set ASSURED if we see see valid ack in ESTABLISHED after SYN_RECV or a valid answer for a picked up connection. */ -set_bit (IPS_ASSURED_BIT , &conntrack->status); +set_bit (IPS_ASSURED_BIT , &conntrack->status); +ip_conntrack_event_cache (IPCT_STATUS , skb); }ip_ct_refresh_acct (conntrack, ctinfo, skb, timeout);
Signature · 5 lines
- Harald Welte <[email protected]> http://netfilter.org/ ============================================================================ "Fragmentation is like classful addressing -- an interesting early architectural error that shows how much experimentation was going on while IP was being designed." -- Paul Vixie
From: Harald Welte <[email protected]>
Date: Sat, 24 Sep 2005 20:50:20 +0200
Quoted 6 lines
[NETFILTER]
ip_conntrack: Update event cache when status changesThe GRE, SCTP and TCP protocol helpers did not call
ip_conntrack_event_cache()when updatingct->status. This patch adds the respective calls.Signed-off-by Harald Welte <[email protected]>
Applied, thanks Harald.