diff options
author | Ville Nuorvala <vnuorval@tcs.hut.fi> | 2006-10-17 01:14:26 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-10-18 22:55:30 -0400 |
commit | 22e1e4d8dcb71762fcbe0c73d720aea8bb2013af (patch) | |
tree | 41b47368c4fcc927cfd86b891470357c795c1956 /net/ipv6/route.c | |
parent | 264e91b68aff1e39b558123498f28bf5aa68b4ee (diff) |
[IPV6]: Always copy rt->u.dst.error when copying a rt6_info.
Signed-off-by: Ville Nuorvala <vnuorval@tcs.hut.fi>
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, 1 insertions, 2 deletions
diff --git a/net/ipv6/route.c b/net/ipv6/route.c index 263c057d17c6..aa96be860e96 100644 --- a/net/ipv6/route.c +++ b/net/ipv6/route.c | |||
@@ -618,8 +618,6 @@ static struct rt6_info *rt6_alloc_clone(struct rt6_info *ort, struct in6_addr *d | |||
618 | ipv6_addr_copy(&rt->rt6i_dst.addr, daddr); | 618 | ipv6_addr_copy(&rt->rt6i_dst.addr, daddr); |
619 | rt->rt6i_dst.plen = 128; | 619 | rt->rt6i_dst.plen = 128; |
620 | rt->rt6i_flags |= RTF_CACHE; | 620 | rt->rt6i_flags |= RTF_CACHE; |
621 | if (rt->rt6i_flags & RTF_REJECT) | ||
622 | rt->u.dst.error = ort->u.dst.error; | ||
623 | rt->u.dst.flags |= DST_HOST; | 621 | rt->u.dst.flags |= DST_HOST; |
624 | rt->rt6i_nexthop = neigh_clone(ort->rt6i_nexthop); | 622 | rt->rt6i_nexthop = neigh_clone(ort->rt6i_nexthop); |
625 | } | 623 | } |
@@ -1540,6 +1538,7 @@ static struct rt6_info * ip6_rt_copy(struct rt6_info *ort) | |||
1540 | rt->u.dst.output = ort->u.dst.output; | 1538 | rt->u.dst.output = ort->u.dst.output; |
1541 | 1539 | ||
1542 | memcpy(rt->u.dst.metrics, ort->u.dst.metrics, RTAX_MAX*sizeof(u32)); | 1540 | memcpy(rt->u.dst.metrics, ort->u.dst.metrics, RTAX_MAX*sizeof(u32)); |
1541 | rt->u.dst.error = ort->u.dst.error; | ||
1543 | rt->u.dst.dev = ort->u.dst.dev; | 1542 | rt->u.dst.dev = ort->u.dst.dev; |
1544 | if (rt->u.dst.dev) | 1543 | if (rt->u.dst.dev) |
1545 | dev_hold(rt->u.dst.dev); | 1544 | dev_hold(rt->u.dst.dev); |