Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 368623
b: refs/heads/master
c: 63998ac
h: refs/heads/master
i:
  368621: 28683f0
  368619: 8c8a067
  368615: aadeab4
  368607: 53d89eb
v: v3
  • Loading branch information
Nicolas Dichtel authored and David S. Miller committed Mar 24, 2013
1 parent 18864e7 commit 0f8c664
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0465277f6b3fd0535428ae935644ac30ce903de0
refs/heads/master: 63998ac24f8370caf99e433483532bab8368eb7e
1 change: 1 addition & 0 deletions trunk/include/net/netns/ipv6.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ struct netns_ipv6 {
struct fib_rules_ops *mr6_rules_ops;
#endif
#endif
atomic_t dev_addr_genid;
};

#if IS_ENABLED(CONFIG_NF_DEFRAG_IPV6)
Expand Down
8 changes: 8 additions & 0 deletions trunk/net/ipv6/addrconf.c
Original file line number Diff line number Diff line change
Expand Up @@ -621,6 +621,8 @@ static int inet6_netconf_dump_devconf(struct sk_buff *skb,
idx = 0;
head = &net->dev_index_head[h];
rcu_read_lock();
cb->seq = atomic_read(&net->ipv6.dev_addr_genid) ^
net->dev_base_seq;
hlist_for_each_entry_rcu(dev, head, index_hlist) {
if (idx < s_idx)
goto cont;
Expand All @@ -638,6 +640,7 @@ static int inet6_netconf_dump_devconf(struct sk_buff *skb,
rcu_read_unlock();
goto done;
}
nl_dump_check_consistent(cb, nlmsg_hdr(skb));
cont:
idx++;
}
Expand Down Expand Up @@ -3874,6 +3877,7 @@ static int in6_dump_addrs(struct inet6_dev *idev, struct sk_buff *skb,
NLM_F_MULTI);
if (err <= 0)
break;
nl_dump_check_consistent(cb, nlmsg_hdr(skb));
}
break;
}
Expand Down Expand Up @@ -3931,6 +3935,7 @@ static int inet6_dump_addr(struct sk_buff *skb, struct netlink_callback *cb,
s_ip_idx = ip_idx = cb->args[2];

rcu_read_lock();
cb->seq = atomic_read(&net->ipv6.dev_addr_genid) ^ net->dev_base_seq;
for (h = s_h; h < NETDEV_HASHENTRIES; h++, s_idx = 0) {
idx = 0;
head = &net->dev_index_head[h];
Expand Down Expand Up @@ -4407,6 +4412,8 @@ static void inet6_prefix_notify(int event, struct inet6_dev *idev,

static void __ipv6_ifa_notify(int event, struct inet6_ifaddr *ifp)
{
struct net *net = dev_net(ifp->idev->dev);

inet6_ifa_notify(event ? : RTM_NEWADDR, ifp);

switch (event) {
Expand All @@ -4432,6 +4439,7 @@ static void __ipv6_ifa_notify(int event, struct inet6_ifaddr *ifp)
dst_free(&ifp->rt->dst);
break;
}
atomic_inc(&net->ipv6.dev_addr_genid);
}

static void ipv6_ifa_notify(int event, struct inet6_ifaddr *ifp)
Expand Down

0 comments on commit 0f8c664

Please sign in to comment.