]> git.baikalelectronics.ru Git - kernel.git/commit
netfilter: nf_tables: set NLM_F_DUMP_INTR if netlink dumping is stale
authorPablo Neira Ayuso <pablo@netfilter.org>
Tue, 1 Jul 2014 10:23:12 +0000 (12:23 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Mon, 14 Jul 2014 10:00:16 +0000 (12:00 +0200)
commit1ea2dae681348542ac5ed0eab3dcd1b10b894d25
treeca7c55906f83d30277e75791b9eff8d25ba7272b
parent28f460eb5b84f31b1c8c02ac32ae0b56a3450dab
netfilter: nf_tables: set NLM_F_DUMP_INTR if netlink dumping is stale

An updater may interfer with the dumping of any of the object lists.
Fix this by using a per-net generation counter and use the
nl_dump_check_consistent() interface so the NLM_F_DUMP_INTR flag is set
to notify userspace that it has to restart the dump since an updater
has interfered.

This patch also replaces the existing consistency checking code in the
rule dumping path since it is broken. Basically, the value that the
dump callback returns is not propagated to userspace via
netlink_dump_start().

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
include/net/netns/nftables.h
net/netfilter/nf_tables_api.c