提交 f1ad9c00 编写于 作者: J jianghaoran 提交者: Zheng Zengkai

ipv6: Don't send rs packets to the interface of ARPHRD_TUNNEL

stable inclusion
from stable-v5.10.121
commit 4d85201adb65013b1455050a8a814f792d4ee3a6
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I5L6CQ

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=4d85201adb65013b1455050a8a814f792d4ee3a6

--------------------------------

[ Upstream commit b52e1cce ]

ARPHRD_TUNNEL interface can't process rs packets
and will generate TX errors

ex:
ip tunnel add ethn mode ipip local 192.168.1.1 remote 192.168.1.2
ifconfig ethn x.x.x.x

ethn: flags=209<UP,POINTOPOINT,RUNNING,NOARP>  mtu 1480
	inet x.x.x.x  netmask 255.255.255.255  destination x.x.x.x
	inet6 fe80::5efe:ac1e:3cdb  prefixlen 64  scopeid 0x20<link>
	tunnel   txqueuelen 1000  (IPIP Tunnel)
	RX packets 0  bytes 0 (0.0 B)
	RX errors 0  dropped 0  overruns 0  frame 0
	TX packets 0  bytes 0 (0.0 B)
	TX errors 3  dropped 0 overruns 0  carrier 0  collisions 0
Signed-off-by: Njianghaoran <jianghaoran@kylinos.cn>
Link: https://lore.kernel.org/r/20220429053802.246681-1-jianghaoran@kylinos.cnSigned-off-by: NJakub Kicinski <kuba@kernel.org>
Signed-off-by: NSasha Levin <sashal@kernel.org>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
Acked-by: NXie XiuQi <xiexiuqi@huawei.com>
上级 8a13fb8c
...@@ -4204,7 +4204,8 @@ static void addrconf_dad_completed(struct inet6_ifaddr *ifp, bool bump_id, ...@@ -4204,7 +4204,8 @@ static void addrconf_dad_completed(struct inet6_ifaddr *ifp, bool bump_id,
send_rs = send_mld && send_rs = send_mld &&
ipv6_accept_ra(ifp->idev) && ipv6_accept_ra(ifp->idev) &&
ifp->idev->cnf.rtr_solicits != 0 && ifp->idev->cnf.rtr_solicits != 0 &&
(dev->flags&IFF_LOOPBACK) == 0; (dev->flags & IFF_LOOPBACK) == 0 &&
(dev->type != ARPHRD_TUNNEL);
read_unlock_bh(&ifp->idev->lock); read_unlock_bh(&ifp->idev->lock);
/* While dad is in progress mld report's source address is in6_addrany. /* While dad is in progress mld report's source address is in6_addrany.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册