提交 8ddec746 编写于 作者: H Harald Welte 提交者: David S. Miller

[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.
Signed-off-by: NHarald Welte <laforge@netfilter.org>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 8689c07e
...@@ -247,6 +247,7 @@ static int gre_packet(struct ip_conntrack *ct, ...@@ -247,6 +247,7 @@ static int gre_packet(struct ip_conntrack *ct,
ct->proto.gre.stream_timeout); ct->proto.gre.stream_timeout);
/* Also, more likely to be important, and not a probe. */ /* Also, more likely to be important, and not a probe. */
set_bit(IPS_ASSURED_BIT, &ct->status); set_bit(IPS_ASSURED_BIT, &ct->status);
ip_conntrack_event_cache(IPCT_STATUS, skb);
} else } else
ip_ct_refresh_acct(ct, conntrackinfo, skb, ip_ct_refresh_acct(ct, conntrackinfo, skb,
ct->proto.gre.timeout); ct->proto.gre.timeout);
......
...@@ -416,6 +416,7 @@ static int sctp_packet(struct ip_conntrack *conntrack, ...@@ -416,6 +416,7 @@ static int sctp_packet(struct ip_conntrack *conntrack,
&& newconntrack == SCTP_CONNTRACK_ESTABLISHED) { && newconntrack == SCTP_CONNTRACK_ESTABLISHED) {
DEBUGP("Setting assured bit\n"); DEBUGP("Setting assured bit\n");
set_bit(IPS_ASSURED_BIT, &conntrack->status); set_bit(IPS_ASSURED_BIT, &conntrack->status);
ip_conntrack_event_cache(IPCT_STATUS, skb);
} }
return NF_ACCEPT; return NF_ACCEPT;
......
...@@ -1014,7 +1014,8 @@ static int tcp_packet(struct ip_conntrack *conntrack, ...@@ -1014,7 +1014,8 @@ static int tcp_packet(struct ip_conntrack *conntrack,
/* Set ASSURED if we see see valid ack in ESTABLISHED /* Set ASSURED if we see see valid ack in ESTABLISHED
after SYN_RECV or a valid answer for a picked up after SYN_RECV or a valid answer for a picked up
connection. */ 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); ip_ct_refresh_acct(conntrack, ctinfo, skb, timeout);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册