From de8dafc90e335cbb06252a087d25a7589b607ad2 Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Tue, 17 Feb 2009 20:40:36 +0100 Subject: 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 --- include/libnfnetlink/libnfnetlink.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include/libnfnetlink/libnfnetlink.h') 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); -- cgit v1.2.3