diff options
author | Nicolas Dichtel <nicolas.dichtel@6wind.com> | 2013-03-22 02:28:42 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-03-24 17:16:29 -0400 |
commit | 0465277f6b3fd0535428ae935644ac30ce903de0 (patch) | |
tree | d773aa622e9f208114a37487bf4dac0862def51d /net/core | |
parent | 976c90b90187f2eb4778d766d52d6ab176714734 (diff) |
ipv4: provide addr and netconf dump consistency info
This patch takes benefit of dev_addr_genid and dev_base_seq to check if a change
occurs during a netlink dump. If a change is detected, the flag NLM_F_DUMP_INTR
is set in the first message after the dump was interrupted.
Note that seq and prev_seq must be reset between each family in rtnl_dump_all()
because they are specific to each family.
Reported-by: Junwei Zhang <junwei.zhang@6wind.com>
Reported-by: Hongjun Li <hongjun.li@6wind.com>
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core')
-rw-r--r-- | net/core/rtnetlink.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c index 751f1244b648..aeb81316a704 100644 --- a/net/core/rtnetlink.c +++ b/net/core/rtnetlink.c | |||
@@ -1929,8 +1929,11 @@ static int rtnl_dump_all(struct sk_buff *skb, struct netlink_callback *cb) | |||
1929 | if (rtnl_msg_handlers[idx] == NULL || | 1929 | if (rtnl_msg_handlers[idx] == NULL || |
1930 | rtnl_msg_handlers[idx][type].dumpit == NULL) | 1930 | rtnl_msg_handlers[idx][type].dumpit == NULL) |
1931 | continue; | 1931 | continue; |
1932 | if (idx > s_idx) | 1932 | if (idx > s_idx) { |
1933 | memset(&cb->args[0], 0, sizeof(cb->args)); | 1933 | memset(&cb->args[0], 0, sizeof(cb->args)); |
1934 | cb->prev_seq = 0; | ||
1935 | cb->seq = 0; | ||
1936 | } | ||
1934 | if (rtnl_msg_handlers[idx][type].dumpit(skb, cb)) | 1937 | if (rtnl_msg_handlers[idx][type].dumpit(skb, cb)) |
1935 | break; | 1938 | break; |
1936 | } | 1939 | } |