All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] netfilter: nf_conntrack_proto_gre: only create ct assured event once
@ 2011-09-30 14:38 Florian Westphal
  2011-10-03 10:47 ` Pablo Neira Ayuso
  0 siblings, 1 reply; 2+ messages in thread
From: Florian Westphal @ 2011-09-30 14:38 UTC (permalink / raw)
  To: netfilter-devel; +Cc: denys, Florian Westphal

GRE connections cause ctnetlink event flood due to ASSURED event
being created for every packet received.

Reported-and-tested-by: Denys Fedoryshchenko <denys@visp.net.lb>
Signed-off-by: Florian Westphal <fw@strlen.de>
---
 net/netfilter/nf_conntrack_proto_gre.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/net/netfilter/nf_conntrack_proto_gre.c b/net/netfilter/nf_conntrack_proto_gre.c
index cf616e5..d69facd 100644
--- a/net/netfilter/nf_conntrack_proto_gre.c
+++ b/net/netfilter/nf_conntrack_proto_gre.c
@@ -241,8 +241,8 @@ static int gre_packet(struct nf_conn *ct,
 		nf_ct_refresh_acct(ct, ctinfo, skb,
 				   ct->proto.gre.stream_timeout);
 		/* Also, more likely to be important, and not a probe. */
-		set_bit(IPS_ASSURED_BIT, &ct->status);
-		nf_conntrack_event_cache(IPCT_ASSURED, ct);
+		if (!test_and_set_bit(IPS_ASSURED_BIT, &ct->status))
+			nf_conntrack_event_cache(IPCT_ASSURED, ct);
 	} else
 		nf_ct_refresh_acct(ct, ctinfo, skb,
 				   ct->proto.gre.timeout);
-- 
1.7.3.4


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

* Re: [PATCH] netfilter: nf_conntrack_proto_gre: only create ct assured event once
  2011-09-30 14:38 [PATCH] netfilter: nf_conntrack_proto_gre: only create ct assured event once Florian Westphal
@ 2011-10-03 10:47 ` Pablo Neira Ayuso
  0 siblings, 0 replies; 2+ messages in thread
From: Pablo Neira Ayuso @ 2011-10-03 10:47 UTC (permalink / raw)
  To: Florian Westphal; +Cc: netfilter-devel, denys

On Fri, Sep 30, 2011 at 04:38:29PM +0200, Florian Westphal wrote:
> GRE connections cause ctnetlink event flood due to ASSURED event
> being created for every packet received.
> 
> Reported-and-tested-by: Denys Fedoryshchenko <denys@visp.net.lb>
> Signed-off-by: Florian Westphal <fw@strlen.de>

http://1984.lsi.us.es/git/?p=net/.git;a=shortlog;h=refs/heads/nf

Applied to my nf branch, thanks.

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

end of thread, other threads:[~2011-10-03 10:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-30 14:38 [PATCH] netfilter: nf_conntrack_proto_gre: only create ct assured event once Florian Westphal
2011-10-03 10:47 ` Pablo Neira Ayuso

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.