mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-30 08:02:30 +00:00
ipv6: Don't change dst->flags using assignments.
This blows away any flags already set in the entry. Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
6e4e2f811b
commit
11d53b4990
1 changed files with 2 additions and 10 deletions
|
@ -1062,14 +1062,6 @@ struct dst_entry *icmp6_dst_alloc(struct net_device *dev,
|
||||||
dst_metric_set(&rt->dst, RTAX_HOPLIMIT, 255);
|
dst_metric_set(&rt->dst, RTAX_HOPLIMIT, 255);
|
||||||
rt->dst.output = ip6_output;
|
rt->dst.output = ip6_output;
|
||||||
|
|
||||||
#if 0 /* there's no chance to use these for ndisc */
|
|
||||||
rt->dst.flags = ipv6_addr_type(addr) & IPV6_ADDR_UNICAST
|
|
||||||
? DST_HOST
|
|
||||||
: 0;
|
|
||||||
ipv6_addr_copy(&rt->rt6i_dst.addr, addr);
|
|
||||||
rt->rt6i_dst.plen = 128;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
spin_lock_bh(&icmp6_dst_lock);
|
spin_lock_bh(&icmp6_dst_lock);
|
||||||
rt->dst.next = icmp6_dst_gc_list;
|
rt->dst.next = icmp6_dst_gc_list;
|
||||||
icmp6_dst_gc_list = &rt->dst;
|
icmp6_dst_gc_list = &rt->dst;
|
||||||
|
@ -1244,7 +1236,7 @@ int ip6_route_add(struct fib6_config *cfg)
|
||||||
ipv6_addr_prefix(&rt->rt6i_dst.addr, &cfg->fc_dst, cfg->fc_dst_len);
|
ipv6_addr_prefix(&rt->rt6i_dst.addr, &cfg->fc_dst, cfg->fc_dst_len);
|
||||||
rt->rt6i_dst.plen = cfg->fc_dst_len;
|
rt->rt6i_dst.plen = cfg->fc_dst_len;
|
||||||
if (rt->rt6i_dst.plen == 128)
|
if (rt->rt6i_dst.plen == 128)
|
||||||
rt->dst.flags = DST_HOST;
|
rt->dst.flags |= DST_HOST;
|
||||||
|
|
||||||
#ifdef CONFIG_IPV6_SUBTREES
|
#ifdef CONFIG_IPV6_SUBTREES
|
||||||
ipv6_addr_prefix(&rt->rt6i_src.addr, &cfg->fc_src, cfg->fc_src_len);
|
ipv6_addr_prefix(&rt->rt6i_src.addr, &cfg->fc_src, cfg->fc_src_len);
|
||||||
|
@ -2025,7 +2017,7 @@ struct rt6_info *addrconf_dst_alloc(struct inet6_dev *idev,
|
||||||
|
|
||||||
in6_dev_hold(idev);
|
in6_dev_hold(idev);
|
||||||
|
|
||||||
rt->dst.flags = DST_HOST;
|
rt->dst.flags |= DST_HOST;
|
||||||
rt->dst.input = ip6_input;
|
rt->dst.input = ip6_input;
|
||||||
rt->dst.output = ip6_output;
|
rt->dst.output = ip6_output;
|
||||||
rt->rt6i_idev = idev;
|
rt->rt6i_idev = idev;
|
||||||
|
|
Loading…
Reference in a new issue