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>
This commit is contained in:
committed by
David S. Miller
parent
976c90b901
commit
0465277f6b
@ -1929,8 +1929,11 @@ static int rtnl_dump_all(struct sk_buff *skb, struct netlink_callback *cb)
|
||||
if (rtnl_msg_handlers[idx] == NULL ||
|
||||
rtnl_msg_handlers[idx][type].dumpit == NULL)
|
||||
continue;
|
||||
if (idx > s_idx)
|
||||
if (idx > s_idx) {
|
||||
memset(&cb->args[0], 0, sizeof(cb->args));
|
||||
cb->prev_seq = 0;
|
||||
cb->seq = 0;
|
||||
}
|
||||
if (rtnl_msg_handlers[idx][type].dumpit(skb, cb))
|
||||
break;
|
||||
}
|
||||
|
Reference in New Issue
Block a user