diff options
Diffstat (limited to 'net/ipv6')
| -rw-r--r-- | net/ipv6/addrconf.c | 15 | ||||
| -rw-r--r-- | net/ipv6/route.c | 4 |
2 files changed, 11 insertions, 8 deletions
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index d7c56f8a5b4e..0424e4e27414 100644 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c | |||
| @@ -3064,14 +3064,15 @@ static struct inet6_ifaddr *if6_get_first(struct seq_file *seq, loff_t pos) | |||
| 3064 | struct hlist_node *n; | 3064 | struct hlist_node *n; |
| 3065 | hlist_for_each_entry_rcu_bh(ifa, n, &inet6_addr_lst[state->bucket], | 3065 | hlist_for_each_entry_rcu_bh(ifa, n, &inet6_addr_lst[state->bucket], |
| 3066 | addr_lst) { | 3066 | addr_lst) { |
| 3067 | if (!net_eq(dev_net(ifa->idev->dev), net)) | ||
| 3068 | continue; | ||
| 3067 | /* sync with offset */ | 3069 | /* sync with offset */ |
| 3068 | if (p < state->offset) { | 3070 | if (p < state->offset) { |
| 3069 | p++; | 3071 | p++; |
| 3070 | continue; | 3072 | continue; |
| 3071 | } | 3073 | } |
| 3072 | state->offset++; | 3074 | state->offset++; |
| 3073 | if (net_eq(dev_net(ifa->idev->dev), net)) | 3075 | return ifa; |
| 3074 | return ifa; | ||
| 3075 | } | 3076 | } |
| 3076 | 3077 | ||
| 3077 | /* prepare for next bucket */ | 3078 | /* prepare for next bucket */ |
| @@ -3089,18 +3090,20 @@ static struct inet6_ifaddr *if6_get_next(struct seq_file *seq, | |||
| 3089 | struct hlist_node *n = &ifa->addr_lst; | 3090 | struct hlist_node *n = &ifa->addr_lst; |
| 3090 | 3091 | ||
| 3091 | hlist_for_each_entry_continue_rcu_bh(ifa, n, addr_lst) { | 3092 | hlist_for_each_entry_continue_rcu_bh(ifa, n, addr_lst) { |
| 3093 | if (!net_eq(dev_net(ifa->idev->dev), net)) | ||
| 3094 | continue; | ||
| 3092 | state->offset++; | 3095 | state->offset++; |
| 3093 | if (net_eq(dev_net(ifa->idev->dev), net)) | 3096 | return ifa; |
| 3094 | return ifa; | ||
| 3095 | } | 3097 | } |
| 3096 | 3098 | ||
| 3097 | while (++state->bucket < IN6_ADDR_HSIZE) { | 3099 | while (++state->bucket < IN6_ADDR_HSIZE) { |
| 3098 | state->offset = 0; | 3100 | state->offset = 0; |
| 3099 | hlist_for_each_entry_rcu_bh(ifa, n, | 3101 | hlist_for_each_entry_rcu_bh(ifa, n, |
| 3100 | &inet6_addr_lst[state->bucket], addr_lst) { | 3102 | &inet6_addr_lst[state->bucket], addr_lst) { |
| 3103 | if (!net_eq(dev_net(ifa->idev->dev), net)) | ||
| 3104 | continue; | ||
| 3101 | state->offset++; | 3105 | state->offset++; |
| 3102 | if (net_eq(dev_net(ifa->idev->dev), net)) | 3106 | return ifa; |
| 3103 | return ifa; | ||
| 3104 | } | 3107 | } |
| 3105 | } | 3108 | } |
| 3106 | 3109 | ||
diff --git a/net/ipv6/route.c b/net/ipv6/route.c index 7c7e963260e1..b1e6cf0b95fd 100644 --- a/net/ipv6/route.c +++ b/net/ipv6/route.c | |||
| @@ -219,7 +219,7 @@ static struct dst_ops ip6_dst_blackhole_ops = { | |||
| 219 | }; | 219 | }; |
| 220 | 220 | ||
| 221 | static const u32 ip6_template_metrics[RTAX_MAX] = { | 221 | static const u32 ip6_template_metrics[RTAX_MAX] = { |
| 222 | [RTAX_HOPLIMIT - 1] = 255, | 222 | [RTAX_HOPLIMIT - 1] = 0, |
| 223 | }; | 223 | }; |
| 224 | 224 | ||
| 225 | static const struct rt6_info ip6_null_entry_template = { | 225 | static const struct rt6_info ip6_null_entry_template = { |
| @@ -1232,7 +1232,7 @@ struct dst_entry *icmp6_dst_alloc(struct net_device *dev, | |||
| 1232 | rt->rt6i_dst.addr = fl6->daddr; | 1232 | rt->rt6i_dst.addr = fl6->daddr; |
| 1233 | rt->rt6i_dst.plen = 128; | 1233 | rt->rt6i_dst.plen = 128; |
| 1234 | rt->rt6i_idev = idev; | 1234 | rt->rt6i_idev = idev; |
| 1235 | dst_metric_set(&rt->dst, RTAX_HOPLIMIT, 255); | 1235 | dst_metric_set(&rt->dst, RTAX_HOPLIMIT, 0); |
| 1236 | 1236 | ||
| 1237 | spin_lock_bh(&icmp6_dst_lock); | 1237 | spin_lock_bh(&icmp6_dst_lock); |
| 1238 | rt->dst.next = icmp6_dst_gc_list; | 1238 | rt->dst.next = icmp6_dst_gc_list; |
