[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1477038230-17288-1-git-send-email-evan.xu.tianwen@gmail.com>
Date: Fri, 21 Oct 2016 16:23:50 +0800
From: XU Tianwen <evan.xu.tianwen@...il.com>
To: yasuyuki.kozakai@...hiba.co.jp, pablo@...filter.org,
kaber@...sh.net, kadlec@...ckhole.kfki.hu, davem@...emloft.net,
kuznet@....inr.ac.ru, jmorris@...ei.org, yoshfuji@...ux-ipv6.org
Cc: netfilter-devel@...r.kernel.org, coreteam@...filter.org,
netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
XU Tianwen <evan.xu.tianwen@...il.com>
Subject: [PATCH] Netfilter: Fix an ICMPv6 bug which caused by a latter ICMPv6 NA packet to inherit the mark of previous NS packet.
The root cause is an ICMPv6 packet hits an untracked connection and inherits a mark from the previous packet to which it is not related, IMO it doesn't make sense to inherit mark for nf_conntrack_untracked.
Signed-off-by: XU Tianwen <evan.xu.tianwen@...il.com>
---
net/ipv6/netfilter/nf_conntrack_proto_icmpv6.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/net/ipv6/netfilter/nf_conntrack_proto_icmpv6.c b/net/ipv6/netfilter/nf_conntrack_proto_icmpv6.c
index f5a61bc..1be9000 100644
--- a/net/ipv6/netfilter/nf_conntrack_proto_icmpv6.c
+++ b/net/ipv6/netfilter/nf_conntrack_proto_icmpv6.c
@@ -223,6 +223,9 @@ icmpv6_error(struct net *net, struct nf_conn *tmpl,
if (type >= 0 && type < sizeof(noct_valid_new) &&
noct_valid_new[type]) {
skb->nfct = &nf_ct_untracked_get()->ct_general;
+#ifdef CONFIG_NF_CONNTRACK_MARK
+ ((struct nf_conn *)skb->nfct)->mark = 0;
+#endif
skb->nfctinfo = IP_CT_NEW;
nf_conntrack_get(skb->nfct);
return NF_ACCEPT;
--
2.1.2
Powered by blists - more mailing lists