diff options
author | YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> | 2006-03-21 02:06:42 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2006-03-21 02:06:42 +0100 |
commit | e317da96227cef28a137e2d1ad790b23e518dd2b (patch) | |
tree | dfe27f9855eb80cacb381ed3012acdb4a4d9fd11 /net/ipv6/route.c | |
parent | [IPV6]: ROUTE: Add experimental support for Route Information Option in RA (R... (diff) | |
download | linux-e317da96227cef28a137e2d1ad790b23e518dd2b.tar.xz linux-e317da96227cef28a137e2d1ad790b23e518dd2b.zip |
[IPV6]: ROUTE: Flag RTF_DEFAULT for Route Infomation for ::/0.
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/route.c')
-rw-r--r-- | net/ipv6/route.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/net/ipv6/route.c b/net/ipv6/route.c index 0f30ee3d94ea..f587a0e6cf34 100644 --- a/net/ipv6/route.c +++ b/net/ipv6/route.c @@ -1403,6 +1403,9 @@ static struct rt6_info *rt6_add_route_info(struct in6_addr *prefix, int prefixle ipv6_addr_copy(&rtmsg.rtmsg_gateway, gwaddr); rtmsg.rtmsg_metric = 1024; rtmsg.rtmsg_flags = RTF_GATEWAY | RTF_ADDRCONF | RTF_ROUTEINFO | RTF_UP | RTF_PREF(pref); + /* We should treat it as a default route if prefix length is 0. */ + if (!prefixlen) + rtmsg.rtmsg_flags |= RTF_DEFAULT; rtmsg.rtmsg_ifindex = ifindex; ip6_route_add(&rtmsg, NULL, NULL, NULL); |