]> Pileus Git - ~andy/linux/blobdiff - net/ipv4/devinet.c
ipv4: provide addr and netconf dump consistency info
[~andy/linux] / net / ipv4 / devinet.c
index 20a9f9274f3feb3d13e361346dae0bf4bfd20dc4..5d985e36753526f4b9cfb37cde3be352556a4b0c 100644 (file)
@@ -1499,6 +1499,8 @@ static int inet_dump_ifaddr(struct sk_buff *skb, struct netlink_callback *cb)
                idx = 0;
                head = &net->dev_index_head[h];
                rcu_read_lock();
+               cb->seq = atomic_read(&net->ipv4.dev_addr_genid) ^
+                         net->dev_base_seq;
                hlist_for_each_entry_rcu(dev, head, index_hlist) {
                        if (idx < s_idx)
                                goto cont;
@@ -1519,6 +1521,7 @@ static int inet_dump_ifaddr(struct sk_buff *skb, struct netlink_callback *cb)
                                        rcu_read_unlock();
                                        goto done;
                                }
+                               nl_dump_check_consistent(cb, nlmsg_hdr(skb));
                        }
 cont:
                        idx++;
@@ -1807,6 +1810,8 @@ static int inet_netconf_dump_devconf(struct sk_buff *skb,
                idx = 0;
                head = &net->dev_index_head[h];
                rcu_read_lock();
+               cb->seq = atomic_read(&net->ipv4.dev_addr_genid) ^
+                         net->dev_base_seq;
                hlist_for_each_entry_rcu(dev, head, index_hlist) {
                        if (idx < s_idx)
                                goto cont;
@@ -1824,6 +1829,7 @@ static int inet_netconf_dump_devconf(struct sk_buff *skb,
                                rcu_read_unlock();
                                goto done;
                        }
+                       nl_dump_check_consistent(cb, nlmsg_hdr(skb));
 cont:
                        idx++;
                }