From: YOSHIFUJI Hideaki Date: Tue, 21 Mar 2006 01:00:48 +0000 (-0800) Subject: [IPV6]: ROUTE: More strict check for default routers in rt6_get_dflt_router(). X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=045927ff84c340da5442543e87be988fcde5a283;p=linux-beck.git [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 Signed-off-by: David S. Miller --- diff --git a/net/ipv6/route.c b/net/ipv6/route.c index f71e2365b43d..ea6eb44618e7 100644 --- a/net/ipv6/route.c +++ b/net/ipv6/route.c @@ -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; }