summaryrefslogtreecommitdiffstats
path: root/src/main.c
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2014-09-16 18:58:11 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2014-09-19 14:57:11 +0200
commit01b27b6d961d548c25f0fc185fd05fc3d2380080 (patch)
treee51fbb12e49e7f31ce6340a30d13f226e51ddb76 /src/main.c
parent8c41f0bff62ba2eb0b3651b65a59511fb38c4947 (diff)
mnl: consistency checks across several netlink dumps
Obtain the generation ID before dumping the object lists. Then, check for generation ID updates when dumping the several lists that this needs. In case of interference, nft has to remove the stale objects and retry from scratch. This is complementary to the NLM_F_DUMP_INTR flag which is local to one single netlink dump. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/main.c b/src/main.c
index 04a98e35..2685b0db 100644
--- a/src/main.c
+++ b/src/main.c
@@ -173,6 +173,7 @@ static int nft_netlink(struct parser_state *state, struct list_head *msgs)
bool batch_supported = netlink_batch_supported();
int ret = 0;
+ netlink_genid_get();
mnl_batch_init();
batch_seqnum = mnl_batch_begin();