| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
Currently two attributes are regarded as different if they are absent in
both objects to be compared. This is obviously incorrect, change to
regard objects as different if an attribute is only present on one of
them or if the attribute data differs.
Signed-off-by: Patrick McHardy <kaber@trash.net>
|
|
|
|
|
|
| |
Seems it got lost during some cleanups.
Signed-off-by: Patrick McHardy <kaber@trash.net>
|
|
|
|
|
|
|
|
|
| |
nfnl_queue_msg_send_verdict_payload() will to send the verdict, mark,
and possibly changed payload through the netlink socket.
Add a few docbook comments in other funcs.
Signed-off-by: Karl Hiramoto <karl@hiramoto.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Create new function nl_send_iovec() to be used to send multiple 'struct iovec'
through the netlink socket. This will be used for NF_QUEUE, to send
packet payload of a modified packet.
Refactor nl_send() to use nl_send_iovec() sending a single struct iovec.
Create new function nl_auto_complete() by refactoring nl_send_auto_complete(),
so other functions that call nl_send may also use nl_auto_complete()
Signed-off-by: Karl Hiramoto <karl@hiramoto.org>
|
|
|
|
|
| |
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}
|
|\
| |
| |
| |
| |
| | |
Conflicts:
lib/Makefile
src/Makefile
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Issues solved:
* PACKAGE_VERSION was abused for SOVERSION
* unneeded DEP stage
* did not support out-of-tree builds
* no way to turn off silent mode
* overriding CFLAGS at make time was not supported
* no static libs were provided
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
|
| | |
|
| |
| |
| |
| |
| |
| | |
- Added initial ematch support
- Added support for the basic classifier
- Added support for the cgroup classifier
|
|/
|
|
|
|
| |
Both files refer to it. The sources including those files are not
guaranteed to include sys/socket.h to ensure that struct ucred is
defined.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Instead of calling the membership functions several times it is
helpfull to extend the API and make the single group functions a
special case.
The value 0 (NFNLGRP_NONE) terminates this list.
Example use:
nl_socket_add_memberships(sock, group_1, group_2, 0);
nl_socket_drop_memberships(sock, group_1, group_2, 0);
Signed-off-by: Holger Eitzenberger <holger@eitzenberger.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
| |
This changeset ensures that internal code properly synchronizes to
ACKs if ACKs are enabled and otherwise return immediately.
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
Adds reference counting to netlink messages so callbacks
can hold on to a message without using the broken keep
message flag.
|
|
|
|
|
|
| |
Hello! It seems that libnl is missing an include for limits.h, which
causes it to FTBFS when glibc 2.8 is installed (currently in
experimental, so I left this bug severity at "normal").
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In file included from addr.c:28:
../include/netlink-local.h:119:1: warning: "__deprecated" redefined
In file included from /usr/include/linux/stddef.h:4,
from /usr/include/linux/posix_types.h:4,
from /usr/include/linux/types.h:8,
from ../include/netlink-local.h:37,
from addr.c:28:
/usr/include/linux/compiler.h:45:1: warning: this is the location of the previous definition
This happens about 100 times. Suggested patch:
|
|
|
|
| |
Bloats the library, not frequently used
|
| |
|
|
|
|
|
|
| |
- Moved env var dumping to nl-addr-list.c
- support for ipv6 lifetimes
- correct and complete help texts
|
| |
|
| |
|
|
|
|
| |
Support parsing of more complex time duration input.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
This changes make nfnl_ct_get_src_port() and others return the value
in host byte order rather than in network byte order.
Also splits printing into details and statistical section and
improves readability.
|
|
|
|
| |
This breaks the API but is the right thing to do.
|
| |
|
|
|
|
| |
Obsoletes internal P_ACCEPT/P_IGNORE
|
| |
|
|
|
|
|
|
|
|
| |
The idea of a common handle is long revised and only misleading,
nl_handle really represents a socket with some additional
action handlers assigned to it.
Alias for nl_handle is kept for backwards compatibility.
|
| |
|
|
|
|
|
| |
The interface index 0 is reserved and can be safely used to
signal that the device does not exist.
|
|
|
|
|
|
|
|
| |
Replaces obsolete calls to nla_get_addr() and nla_get_data()
with nl_addr_alloc_attr() respectively nl_data_alloc_attr().
Also fixes missing error handling while parsing routing multipath
configuration.
|
|
|
|
|
| |
Since we've broken the API anyway, remove some aliases which only
exist for backwards compatibility.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In order for the interface to become more thread safe, the error
handling was revised to no longer depend on a static errno and
error string buffer.
This patch converts all error paths to return a libnl specific
error code which can be translated to a error message using
nl_geterror(int error). The functions nl_error() and
nl_get_errno() are therefore obsolete.
This change required various sets of function prototypes to be
changed in order to return an error code, the most prominent
are:
struct nl_cache *foo_alloc_cache(...);
changed to:
int foo_alloc_cache(..., struct nl_cache **);
struct nl_msg *foo_build_request(...);
changed to:
int foo_build_request(..., struct nl_msg **);
struct foo *foo_parse(...);
changed to:
int foo_parse(..., struct foo **);
This pretty much only leaves trivial allocation functions to
still return a pointer object which can still return NULL to
signal out of memory.
This change is a serious API and ABI breaker, sorry!
|
|
|
|
|
|
| |
Added rtnl_route_foreach_nexthop() to walk the list of nexthops invoking a
caller-provided callback for each nexthop entry, and added rtnl_route_nexthop_n()
to retrieve the Nth nexthop entry in the list.
|
| |
|
|
|
|
|
|
| |
This changesets adds the possibility to fill a nl_cache with
the contents of the route cache. It also adds the possibility
to limit route caches to certain address families.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
New netem-related functionality:
Added ability to save new settings to the kernel. In netem.c, the
netem_get_opts() stub has been replaced with netem_build_msg() which
manipulates the nl_msg data directly and returns an error code instead
of a new nl_msg. Modifications to qdisc_build() in qdisc.c and struct
rtnl_qdisc_ops were necessary for this.
Added support for getting/setting corruption probability/correlation.
Added support for setting a delay distribution.
Fixed tbf_msg_parser() to call tbf_alloc() instead of tbf_qdisc() to
prevent a seg fault.
|
| |
|