diff options
| author | Anton Altaparmakov <aia21@cantab.net> | 2006-01-03 07:51:07 -0500 |
|---|---|---|
| committer | Anton Altaparmakov <aia21@cantab.net> | 2006-01-03 07:51:07 -0500 |
| commit | d087e4bdd24ebe3ae3d0b265b6573ec901af4b4b (patch) | |
| tree | c2db1b4958bbf617a25398b7ef93d82006b26a17 /net/ipv6/route.c | |
| parent | 292d4ed32e35df4755052b5002e533348d1648fd (diff) | |
| parent | 88026842b0a760145aa71d69e74fbc9ec118ca44 (diff) | |
Merge branch 'master' of /usr/src/ntfs-2.6/
Diffstat (limited to 'net/ipv6/route.c')
| -rw-r--r-- | net/ipv6/route.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/net/ipv6/route.c b/net/ipv6/route.c index a7a537b50595..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, | |||
| 413 | rt = ip6_rt_copy(ort); | 413 | rt = ip6_rt_copy(ort); |
| 414 | 414 | ||
| 415 | if (rt) { | 415 | if (rt) { |
| 416 | ipv6_addr_copy(&rt->rt6i_dst.addr, daddr); | 416 | if (!(rt->rt6i_flags&RTF_GATEWAY)) { |
| 417 | 417 | if (rt->rt6i_dst.plen != 128 && | |
| 418 | if (!(rt->rt6i_flags&RTF_GATEWAY)) | 418 | ipv6_addr_equal(&rt->rt6i_dst.addr, daddr)) |
| 419 | rt->rt6i_flags |= RTF_ANYCAST; | ||
| 419 | ipv6_addr_copy(&rt->rt6i_gateway, daddr); | 420 | ipv6_addr_copy(&rt->rt6i_gateway, daddr); |
| 421 | } | ||
| 420 | 422 | ||
| 423 | ipv6_addr_copy(&rt->rt6i_dst.addr, daddr); | ||
| 421 | rt->rt6i_dst.plen = 128; | 424 | rt->rt6i_dst.plen = 128; |
| 422 | rt->rt6i_flags |= RTF_CACHE; | 425 | rt->rt6i_flags |= RTF_CACHE; |
| 423 | rt->u.dst.flags |= DST_HOST; | 426 | rt->u.dst.flags |= DST_HOST; |
| @@ -829,7 +832,7 @@ int ip6_route_add(struct in6_rtmsg *rtmsg, struct nlmsghdr *nlh, | |||
| 829 | } | 832 | } |
| 830 | 833 | ||
| 831 | rt->u.dst.obsolete = -1; | 834 | rt->u.dst.obsolete = -1; |
| 832 | rt->rt6i_expires = clock_t_to_jiffies(rtmsg->rtmsg_info); | 835 | rt->rt6i_expires = jiffies + clock_t_to_jiffies(rtmsg->rtmsg_info); |
| 833 | if (nlh && (r = NLMSG_DATA(nlh))) { | 836 | if (nlh && (r = NLMSG_DATA(nlh))) { |
| 834 | rt->rt6i_protocol = r->rtm_protocol; | 837 | rt->rt6i_protocol = r->rtm_protocol; |
| 835 | } else { | 838 | } else { |
| @@ -1413,7 +1416,9 @@ struct rt6_info *addrconf_dst_alloc(struct inet6_dev *idev, | |||
| 1413 | rt->u.dst.obsolete = -1; | 1416 | rt->u.dst.obsolete = -1; |
| 1414 | 1417 | ||
| 1415 | rt->rt6i_flags = RTF_UP | RTF_NONEXTHOP; | 1418 | rt->rt6i_flags = RTF_UP | RTF_NONEXTHOP; |
| 1416 | if (!anycast) | 1419 | if (anycast) |
| 1420 | rt->rt6i_flags |= RTF_ANYCAST; | ||
| 1421 | else | ||
| 1417 | rt->rt6i_flags |= RTF_LOCAL; | 1422 | rt->rt6i_flags |= RTF_LOCAL; |
| 1418 | rt->rt6i_nexthop = ndisc_get_neigh(rt->rt6i_dev, &rt->rt6i_gateway); | 1423 | rt->rt6i_nexthop = ndisc_get_neigh(rt->rt6i_dev, &rt->rt6i_gateway); |
| 1419 | if (rt->rt6i_nexthop == NULL) { | 1424 | if (rt->rt6i_nexthop == NULL) { |
