Commit d420895e authored by YOSHIFUJI Hideaki's avatar YOSHIFUJI Hideaki Committed by David S. Miller

ipv6 route: Convert rt6_device_match() to use RT6_LOOKUP_F_xxx flags.

The commit 77d16f45 ("[IPV6] ROUTE:
Unify RT6_F_xxx and RT6_SELECT_F_xxx flags") intended to pass various
routing lookup hints around RT6_LOOKUP_F_xxx flags, but conversion was
missing for rt6_device_match().
Signed-off-by: default avatarYOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 59d88c00
...@@ -240,7 +240,7 @@ static inline int rt6_need_strict(struct in6_addr *daddr) ...@@ -240,7 +240,7 @@ static inline int rt6_need_strict(struct in6_addr *daddr)
static inline struct rt6_info *rt6_device_match(struct net *net, static inline struct rt6_info *rt6_device_match(struct net *net,
struct rt6_info *rt, struct rt6_info *rt,
int oif, int oif,
int strict) int flags)
{ {
struct rt6_info *local = NULL; struct rt6_info *local = NULL;
struct rt6_info *sprt; struct rt6_info *sprt;
...@@ -253,7 +253,7 @@ static inline struct rt6_info *rt6_device_match(struct net *net, ...@@ -253,7 +253,7 @@ static inline struct rt6_info *rt6_device_match(struct net *net,
if (dev->flags & IFF_LOOPBACK) { if (dev->flags & IFF_LOOPBACK) {
if (sprt->rt6i_idev == NULL || if (sprt->rt6i_idev == NULL ||
sprt->rt6i_idev->dev->ifindex != oif) { sprt->rt6i_idev->dev->ifindex != oif) {
if (strict && oif) if (flags & RT6_LOOKUP_F_IFACE && oif)
continue; continue;
if (local && (!oif || if (local && (!oif ||
local->rt6i_idev->dev->ifindex == oif)) local->rt6i_idev->dev->ifindex == oif))
...@@ -266,7 +266,7 @@ static inline struct rt6_info *rt6_device_match(struct net *net, ...@@ -266,7 +266,7 @@ static inline struct rt6_info *rt6_device_match(struct net *net,
if (local) if (local)
return local; return local;
if (strict) if (flags & RT6_LOOKUP_F_IFACE)
return net->ipv6.ip6_null_entry; return net->ipv6.ip6_null_entry;
} }
return rt; return rt;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment