aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>2006-03-20 20:00:48 -0500
committerDavid S. Miller <davem@davemloft.net>2006-03-20 20:00:48 -0500
commit045927ff84c340da5442543e87be988fcde5a283 (patch)
treefc8d51e6fc9a17915c6eeca727aa64952f67002c
parent554cfb7ee5d4f2d0edb280e66e4a2db1906a8300 (diff)
[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>
-rw-r--r--net/ipv6/route.c1
1 files changed, 1 insertions, 0 deletions
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
1248 write_lock_bh(&rt6_lock); 1248 write_lock_bh(&rt6_lock);
1249 for (rt = fn->leaf; rt; rt=rt->u.next) { 1249 for (rt = fn->leaf; rt; rt=rt->u.next) {
1250 if (dev == rt->rt6i_dev && 1250 if (dev == rt->rt6i_dev &&
1251 ((rt->rt6i_flags & (RTF_ADDRCONF | RTF_DEFAULT)) == (RTF_ADDRCONF | RTF_DEFAULT)) &&
1251 ipv6_addr_equal(&rt->rt6i_gateway, addr)) 1252 ipv6_addr_equal(&rt->rt6i_gateway, addr))
1252 break; 1253 break;
1253 } 1254 }