[IPV6]: ROUTE: More strict check for default routers in rt6_get_dflt_router().
Check RTF_ADDRCONF|RTF_DEFAULT in rt6_get_dflt_router(). Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
554cfb7ee5
commit
045927ff84
1 changed files with 1 additions and 0 deletions
|
@ -1248,6 +1248,7 @@ struct rt6_info *rt6_get_dflt_router(struct in6_addr *addr, struct net_device *d
|
|||
write_lock_bh(&rt6_lock);
|
||||
for (rt = fn->leaf; rt; rt=rt->u.next) {
|
||||
if (dev == rt->rt6i_dev &&
|
||||
((rt->rt6i_flags & (RTF_ADDRCONF | RTF_DEFAULT)) == (RTF_ADDRCONF | RTF_DEFAULT)) &&
|
||||
ipv6_addr_equal(&rt->rt6i_gateway, addr))
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue