]> 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)
commit16194f384d06bb4eeb704e19ca62bebee08f28c3
treeca7c55906f83d30277e75791b9eff8d25ba7272b
parentc8036d9c46aed8d1309fd8e416836806489886d1
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