dect
/
libnl
Archived
13
0
Fork 0
Commit Graph

8 Commits

Author SHA1 Message Date
Isaac 996b502961 FTBFS with musl libc: Missing includes
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.
2012-05-13 11:18:28 +02:00
Patrick McHardy 897828de32 src/nf-queue: revert nonsensical change
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>
2010-10-29 01:00:25 +02:00
Karl Hiramoto d378220c96 src/nf-queue.c: cleanup and improve performance of test program for NF_QUEUE
* 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>
2010-04-19 12:58:39 +02:00
Thomas Graf 8808743839 CLI - Command Line Interface Library
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}
2009-12-16 16:20:46 +01:00
Patrick McHardy f9071054d0 libnl: fix socket function rename related build failure
Signed-off-by: Patrick McHardy <kaber@trash.net>
2009-01-21 10:01:39 +01:00
Patrick McHardy 334f551c59 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>
2008-10-23 13:59:40 +02:00
Thomas Graf 10cf5a586c New set of libnl tools
Converts all tools to the API changes and improves the useability by
introducing regular options and long options.
2008-05-23 00:02:02 +02:00
Patrick McHardy e72cb033f2 [LIBNL]: Add nfnetlink_queue support
Signed-off-by: Patrick McHardy <kaber@trash.net>
2008-02-07 12:57:53 +01:00