Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 17fb0b2b authored by David Ahern's avatar David Ahern Committed by David S. Miller
Browse files

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: default avatarDavid Ahern <dsa@cumulusnetworks.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 49d28b56
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -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;