diff options
author | Patrick McHardy <kaber@trash.net> | 2008-10-23 11:47:08 (GMT) |
---|---|---|
committer | Thomas Graf <tgr@plip.localdomain> | 2008-10-23 11:59:40 (GMT) |
commit | 334f551c5994f7a5a2163fd73ca20d201c7e7bf0 (patch) | |
tree | b82f7236085710dd5e8a733844f68f6d0367d39f /lib/netfilter | |
parent | cfcfca070355b246028df60da79813f09ed65755 (diff) | |
download | libnl-334f551c5994f7a5a2163fd73ca20d201c7e7bf0.zip libnl-334f551c5994f7a5a2163fd73ca20d201c7e7bf0.tar.gz libnl-334f551c5994f7a5a2163fd73ca20d201c7e7bf0.tar.bz2 |
libnl: nfqueue: add nfqueue specific socket allocation function
commit e92539843a0c7e5116254382626cce226bf2135e
Author: Patrick McHardy <kaber@trash.net>
Date: Thu Oct 23 13:46:16 2008 +0200
libnl: nfqueue: add nfqueue specific socket allocation function
nfqueue users usually send verdict messages from the receive callback.
When waiting for ACKs, the receive callback might be called again
recursively until the stack blows up.
Add a nfqueue specific socket allocation function that automatically
disables ACKing for the socket.
Signed-off-by: Patrick McHardy <kaber@trash.net>
Diffstat (limited to 'lib/netfilter')
-rw-r--r-- | lib/netfilter/queue.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/netfilter/queue.c b/lib/netfilter/queue.c index 8d3c7ce..ff1de0e 100644 --- a/lib/netfilter/queue.c +++ b/lib/netfilter/queue.c @@ -24,6 +24,16 @@ #include <netlink/netfilter/nfnl.h> #include <netlink/netfilter/queue.h> +struct nl_sock *nfnl_queue_socket_alloc(void) +{ + struct nl_sock *nlsk; + + nlsk = nl_socket_alloc(); + if (nlsk) + nl_socket_disable_auto_ack(nlsk); + return nlsk; +} + static int send_queue_request(struct nl_sock *sk, struct nl_msg *msg) { int err; |