diff options
author | David S. Miller <davem@sunset.davemloft.net> | 2005-12-22 16:41:27 +0100 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2005-12-22 16:41:27 +0100 |
commit | e6469297d4eecfd9f46929fe1f56a01141cb0791 (patch) | |
tree | 9cdd368a9c5e02c177e54edcfd8bcc06155526a9 /net/ipv6/route.c | |
parent | [IPSEC]: Fix policy updates missed by sockets (diff) | |
parent | [IPV6]: Don't select a tentative address as a source address. (diff) | |
download | linux-e6469297d4eecfd9f46929fe1f56a01141cb0791.tar.xz linux-e6469297d4eecfd9f46929fe1f56a01141cb0791.zip |
Merge git://git.skbuff.net/gitroot/yoshfuji/linux-2.6.14+git+ipv6-fix-20051221a
Diffstat (limited to 'net/ipv6/route.c')
-rw-r--r-- | net/ipv6/route.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/net/ipv6/route.c b/net/ipv6/route.c index 7c68bfbee361..66140f13d119 100644 --- a/net/ipv6/route.c +++ b/net/ipv6/route.c @@ -413,11 +413,14 @@ static struct rt6_info *rt6_cow(struct rt6_info *ort, struct in6_addr *daddr, rt = ip6_rt_copy(ort); if (rt) { - ipv6_addr_copy(&rt->rt6i_dst.addr, daddr); - - if (!(rt->rt6i_flags&RTF_GATEWAY)) + if (!(rt->rt6i_flags&RTF_GATEWAY)) { + if (rt->rt6i_dst.plen != 128 && + ipv6_addr_equal(&rt->rt6i_dst.addr, daddr)) + rt->rt6i_flags |= RTF_ANYCAST; ipv6_addr_copy(&rt->rt6i_gateway, daddr); + } + ipv6_addr_copy(&rt->rt6i_dst.addr, daddr); rt->rt6i_dst.plen = 128; rt->rt6i_flags |= RTF_CACHE; rt->u.dst.flags |= DST_HOST; @@ -1413,7 +1416,9 @@ struct rt6_info *addrconf_dst_alloc(struct inet6_dev *idev, rt->u.dst.obsolete = -1; rt->rt6i_flags = RTF_UP | RTF_NONEXTHOP; - if (!anycast) + if (anycast) + rt->rt6i_flags |= RTF_ANYCAST; + else rt->rt6i_flags |= RTF_LOCAL; rt->rt6i_nexthop = ndisc_get_neigh(rt->rt6i_dev, &rt->rt6i_gateway); if (rt->rt6i_nexthop == NULL) { |