[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1343912455-4444-1-git-send-email-mypopydev@gmail.com>
Date: Thu, 2 Aug 2012 21:00:55 +0800
From: Jun Zhao <mypopydev@...il.com>
To: "David S. Miller" <davem@...emloft.net>,
Alexey Kuznetsov <kuznet@....inr.ac.ru>,
James Morris <jmorris@...ei.org>,
Hideaki YOSHIFUJI <yoshfuji@...ux-ipv6.org>,
netdev@...r.kernel.org
Cc: mypopydev@...il.com
Subject: [PATCH 1/1] ipv6 : ip6mr.c : Fix can't match the IPv6 multicast packets with input net device in netfilter FORWARD chain.
Current kernel change the skb's net device with output device before netfilter FORWARD chain,
that will lead to can't match the IPv6 multicast packets with input net device in netfilter
FORWARD chain.
the test case for reproduce this issue as follow:
IPv6 multicast udp stream from eth0(input device) to eth1(output device)
Dst Addr: Port
{ff03::4}:6789 --->
Router
+---------------------------+
-------> | [eth0] --FORWARD--> [eth1]| ------->
+---------------------------+
ip6tables -I FORWARD -p udp -i eth0 -o eth1 --dst ff03::4 -j ACCEPT [first rules ]
ip6tables -A FORWARD -p udp -i eth1 -o eth1 --dst ff03::4 -j ACCEPT [second rules]
Before fix this issue, it will match the second rules not the first rules. you can used
command "ip6tables -L -vnx" to check the match result.
Signed-off-by: Jun Zhao <mypopydev@...il.com>
---
net/ipv6/ip6mr.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/net/ipv6/ip6mr.c b/net/ipv6/ip6mr.c
index 4532973..a9d3dd7 100644
--- a/net/ipv6/ip6mr.c
+++ b/net/ipv6/ip6mr.c
@@ -1946,7 +1946,7 @@ static int ip6mr_forward2(struct net *net, struct mr6_table *mrt,
* result in receiving multiple packets.
*/
dev = vif->dev;
- skb->dev = dev;
+
vif->pkt_out++;
vif->bytes_out += skb->len;
--
1.7.2.5
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists