summaryrefslogtreecommitdiffstats
path: root/src/nf-queue.c
Commit message (Collapse)AuthorAgeFilesLines
* src: Silence all warningsThomas Graf2014-08-261-2/+1
| | | | | Signed-off-by: Thomas Graf <tgraf@suug.ch> Signed-off-by: Thomas Haller <thaller@redhat.com>
* nf: nfnl_*_str2copy_mode() should return intThomas Graf2014-08-261-1/+1
| | | | | | | | | | | | | ... to be able to return a negative error code for unknown modes. [thaller@redhat.com: This is potentially an ABI break, but since the size of the enum is implementation defined, it seems anyway unstable to have them as function arguments/return values.] http://lists.infradead.org/pipermail/libnl/2014-August/001616.html Signed-off-by: Thomas Graf <tgraf@suug.ch> Signed-off-by: Thomas Haller <thaller@redhat.com>
* FTBFS with musl libc: Missing includesIsaac2012-05-131-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Hello, libnl 3.2.9 does not build with musl libc, without patching. I' using a current musl libc (http://www.etalabs.net/musl/) with linux 2.6.32 headers. At first there were a couple problems on the musl side, but those are resolved. However, I found some other issues: First, two files were missing #include <byteswap.h>: lib/netfilter/log_msg.c lib/netfilter/queue_msg.c These files used __bswap_64 (which should be bswap_64), a macro declared in byteswap.h Second, I got this error after fixing that: In file included from nf-queue.c:16: ./include/linux/netfilter.h:53: error: field in has incomplete type ./include/linux/netfilter.h:54: error: field in6 has incomplete type I found that src/nf-queue.c is missing an #include <netinet/in.h> Attached is a patch which resolves these issues. I've tested with both musl and glibc, and it builds cleanly on both.
* src/nf-queue: revert nonsensical changePatrick McHardy2010-10-281-24/+0
| | | | | | | | | | | | The only part of commit d378220c (src/nf-queue.c: cleanup and improve performance of test program for NF_QUEUE) that actually makes sense is the increase in receive buffer size. Issuing verdicts for IDs not delivered to userspace is a wasted effort since the kernel drops packets itself when netlink message delivery fails. This would actually have been noticed by a return value of -ENOENT if the result of nfnl_queue_msg_send_verdict() would have been checked. Signed-off-by: Patrick McHardy <kaber@trash.net>
* src/nf-queue.c: cleanup and improve performance of test program for NF_QUEUEKarl Hiramoto2010-04-191-1/+31
| | | | | | | | | | | | | | | | | | | | | | | | * Fix filename in file header * If the kernel or netlink socket becomes over loaded, the kernel starts printing error messages like: nf_queue: full at 1024 entries, dropping packets(s). Dropped: 1 nf_queue: full at 1024 entries, dropping packets(s). Dropped: 2 nf_queue: full at 1024 entries, dropping packets(s). Dropped: 3 So detect out of order packet ID's and set the NF_ACCEPT verdictÂ, so they will be removed from the kernel queue. * increase socket buffer to improve performance without these changes sending more than 100 KB/s over tcp HTTP lo(localhost) was difficult on my core2 duo machine, due to so many dropped packets. After these changes over 150 MB/s was easy. * improve help text Signed-off-by: Karl Hiramoto <karl@hiramoto.org>
* CLI - Command Line Interface LibraryThomas Graf2009-12-161-12/+32
| | | | | Moved common code in src/ used by CLI tools to src/lib/ for possible use by other CLI tools. Just link to libnl-cli.{so|la}
* libnl: fix socket function rename related build failurePatrick McHardy2009-01-211-1/+1
| | | | Signed-off-by: Patrick McHardy <kaber@trash.net>
* libnl: nfqueue: add nfqueue specific socket allocation functionPatrick McHardy2008-10-231-1/+4
| | | | | | | | | | | | | | | | | 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>
* New set of libnl toolsThomas Graf2008-05-221-80/+27
| | | | | Converts all tools to the API changes and improves the useability by introducing regular options and long options.
* [LIBNL]: Add nfnetlink_queue supportPatrick McHardy2008-02-071-0/+172
Signed-off-by: Patrick McHardy <kaber@trash.net>