提交 17fb0b2b 编写于 作者: D David Ahern 提交者: David S. Miller

net: Remove redundant oif checks in rt6_device_match

The oif has already been checked that it is non-zero; the 2 additional
checks on oif within that if (oif) {...} block are redundant.

CC: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: NDavid Ahern <dsa@cumulusnetworks.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 49d28b56
......@@ -474,10 +474,10 @@ static inline struct rt6_info *rt6_device_match(struct net *net,
if (dev->flags & IFF_LOOPBACK) {
if (!sprt->rt6i_idev ||
sprt->rt6i_idev->dev->ifindex != oif) {
if (flags & RT6_LOOKUP_F_IFACE && oif)
if (flags & RT6_LOOKUP_F_IFACE)
continue;
if (local && (!oif ||
local->rt6i_idev->dev->ifindex == oif))
if (local &&
local->rt6i_idev->dev->ifindex == oif)
continue;
}
local = sprt;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册