netfilter: reset nf_trace in nf_reset
authorGao feng <gaofeng@cn.fujitsu.com>
Thu, 21 Mar 2013 19:48:41 +0000 (19:48 +0000)
committerPablo Neira Ayuso <pablo@netfilter.org>
Mon, 25 Mar 2013 13:21:23 +0000 (14:21 +0100)
We forgot to clear the nf_trace of sk_buff in nf_reset,
When we use veth device, this nf_trace information will
be leaked from one net namespace to another net namespace.

Signed-off-by: Gao feng <gaofeng@cn.fujitsu.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
include/linux/skbuff.h

index 441f5bfdab8ea476749bb512d2c7deeed7399a83..72b396751de7bbab16c54df29edf44d3ef7af447 100644 (file)
@@ -2641,6 +2641,9 @@ static inline void nf_reset(struct sk_buff *skb)
        nf_bridge_put(skb->nf_bridge);
        skb->nf_bridge = NULL;
 #endif
+#if IS_ENABLED(CONFIG_NETFILTER_XT_TARGET_TRACE)
+       skb->nf_trace = 0;
+#endif
 }
 
 /* Note: This doesn't put any conntrack and bridge info in dst. */