summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJozsef Kadlecsik <kadlec@blackhole.kfki.hu>2011-05-24 09:34:01 +0200
committerJozsef Kadlecsik <kadlec@blackhole.kfki.hu>2011-05-24 09:34:01 +0200
commitab446d36b014120e15668ca0f77958110022ec8a (patch)
tree2d1577c1fa7f7a8255460bc7c80b823c15851346
parenteb77f0db6a95691bc62ce9669c27f7cfa173bee5 (diff)
Fix the message sequence number book-keeping
The internal messages mix with the public messages and that confused the sequence number book-keeping. Move setting/updating into ipset_mnl_query.
-rw-r--r--lib/mnl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/mnl.c b/lib/mnl.c
index d18ec04..9b7267c 100644
--- a/lib/mnl.c
+++ b/lib/mnl.c
@@ -75,7 +75,6 @@ ipset_mnl_fill_hdr(struct ipset_handle *handle, enum ipset_cmd cmd,
nlh->nlmsg_flags = cmdflags[cmd - 1];
if (envflags & IPSET_ENV_EXIST)
nlh->nlmsg_flags &= ~NLM_F_EXCL;
- nlh->nlmsg_seq = ++handle->seq;
nfg = mnl_nlmsg_put_extra_header(nlh, sizeof(struct nfgenmsg));
nfg->nfgen_family = AF_INET;
@@ -92,6 +91,7 @@ ipset_mnl_query(struct ipset_handle *handle, void *buffer, size_t len)
assert(handle);
assert(buffer);
+ nlh->nlmsg_seq = ++handle->seq;
#ifdef IPSET_DEBUG
ipset_debug_msg("sent", nlh, nlh->nlmsg_len);
#endif