path: root/include
diff options
authorPablo Neira Ayuso <>2009-02-17 20:40:36 +0100
committerPablo Neira Ayuso <>2009-02-17 20:40:36 +0100
commitde8dafc90e335cbb06252a087d25a7589b607ad2 (patch)
treed11a6a4c82569a466245181cb5a06995eabd4b32 /include
parentb5194b353d27aa0c480691be44e2d4778759c9c0 (diff)
nfnl: allow disabling and enabling sequence tracking
This patch adds a couple of functions to enable and disable netlink sequence tracking. Since nfqueue goes over a unicast socket, the same channel to receive control messages and packets is used. This leads to race conditions that may trigger sporious out-of-sequence errors while creating queues and receiving high load of packets at the same time. Reported-by: Anton Vazir <> Signed-off-by: Pablo Neira Ayuso <>
Diffstat (limited to 'include')
1 files changed, 4 insertions, 0 deletions
diff --git a/include/libnfnetlink/libnfnetlink.h b/include/libnfnetlink/libnfnetlink.h
index b2f3652..10b6478 100644
--- a/include/libnfnetlink/libnfnetlink.h
+++ b/include/libnfnetlink/libnfnetlink.h
@@ -60,6 +60,10 @@ extern struct nfnl_subsys_handle *nfnl_subsys_open(struct nfnl_handle *,
unsigned int);
extern void nfnl_subsys_close(struct nfnl_subsys_handle *);
+/* set and unset sequence tracking */
+void nfnl_set_sequence_tracking(struct nfnl_handle *h);
+void nfnl_unset_sequence_tracking(struct nfnl_handle *h);
/* set receive buffer size (for nfnl_catch) */
extern void nfnl_set_rcv_buffer_size(struct nfnl_handle *h, unsigned int size);