提交 161980f4 编写于 作者: D David S. Miller

[IPV6]: Revert recent change to rt6_check_dev().

This reverts a0d78ebf

It causes pings to link-local addresses to fail.
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 254d0d24
......@@ -311,21 +311,12 @@ static inline void rt6_probe(struct rt6_info *rt)
static inline int rt6_check_dev(struct rt6_info *rt, int oif)
{
struct net_device *dev = rt->rt6i_dev;
int ret = 0;
if (!oif)
return 2;
if (dev->flags & IFF_LOOPBACK) {
if (!WARN_ON(rt->rt6i_idev == NULL) &&
rt->rt6i_idev->dev->ifindex == oif)
ret = 1;
else
return 0;
}
if (dev->ifindex == oif)
if (!oif || dev->ifindex == oif)
return 2;
return ret;
if ((dev->flags & IFF_LOOPBACK) &&
rt->rt6i_idev && rt->rt6i_idev->dev->ifindex == oif)
return 1;
return 0;
}
static inline int rt6_check_neigh(struct rt6_info *rt)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册