[NETFILTER] ip_conntrack: Update event cache when status changes
authorHarald Welte <laforge@netfilter.org>
Sat, 24 Sep 2005 23:56:08 +0000 (16:56 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sat, 24 Sep 2005 23:56:08 +0000 (16:56 -0700)
The GRE, SCTP and TCP protocol helpers did not call
ip_conntrack_event_cache() when updating ct->status.  This patch adds
the respective calls.

Signed-off-by: Harald Welte <laforge@netfilter.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/netfilter/ip_conntrack_proto_gre.c
net/ipv4/netfilter/ip_conntrack_proto_sctp.c
net/ipv4/netfilter/ip_conntrack_proto_tcp.c

index de3cb9db6f857ffd8064f12cae2c2dd719453c8a..744abb9d377a4399463261d759f5f7e83acae2dd 100644 (file)
@@ -247,6 +247,7 @@ static int gre_packet(struct ip_conntrack *ct,
                                   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);
index a875f35e576ddfd117a2ac4224f1a5e9feff3016..59a4a0111dd3fa9d91b2863a25069dbbfee56d8f 100644 (file)
@@ -416,6 +416,7 @@ static int sctp_packet(struct ip_conntrack *conntrack,
                && 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;
index 1985abc59d2497f13c453750277d71da0bf73946..121760d6cc50cd2ccd4568591168988606ab15d3 100644 (file)
@@ -1014,7 +1014,8 @@ static int tcp_packet(struct ip_conntrack *conntrack,
                /* 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);