| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
|
|
|
|
|
|
|
|
|
|
|
| |
libnfnetlink.c: In function ‘nfnl_open’:
libnfnetlink.c:177:6: warning: variable ‘err’ set but not used [-Wunused-but-set-variable]
The getsockname value was not checked before. Better to check for errors, but
I prefer not to modify this behaviour. This library will enter EOL once all
netfilter libraries are fully ported to libmnl.
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
RTM_GETLINK with NLM_F_DUMP returns a multi-part netlink message.
The existing code only handled the first message of it, thus,
ignoring the remaining interfaces.
This is the cause of the following bug in conntrackd:
[Thu Aug 9 14:14:23 2012] (pid=3819) [notice] -- starting in daemon mode --
[Thu Aug 9 14:14:23 2012] (pid=3819) [ERROR] no dedicated links available!
[Thu Aug 9 14:14:23 2012] (pid=3819) [ERROR] no dedicated links available!
[Thu Aug 9 14:14:23 2012] (pid=3819) [ERROR] no dedicated links available!
[Thu Aug 9 14:19:54 2012] (pid=3819) [notice] ---- shutdown received ----
Thanks to Jan Engelhardt for providing useful pointer to address the
problem.
Reported-by: Arturo Borrero <aborrero@cica.es>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
|
|
|
|
| |
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
|
|
|
|
| |
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
|
|
|
|
|
|
|
|
|
| |
Instead of brute-force information extraction based on the device index.
./iftest eth0
index (2) is eth0 (NOT RUNNING) (UP)
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
|
|
|
|
| |
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
|
|
|
|
|
|
|
| |
The result of AC_EXEEXT is never used -- there is no ${EXEEXT} to be
found in the Makefiles.
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
|
|
|
|
|
|
|
|
|
|
| |
This patch updates the copyright header and remove one ambiguos
reference "incorporated herein by reference".
This patch does *not* change the licensing terms of this library.
It just clarifies it.
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
|
|
|
|
|
|
|
|
| |
CC iftable.lo
CC rtnl.lo
CCLD libnfnetlink.la
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
|
| |
|
| |
|
|
|
|
| |
Only ignore these paths if they are a directory.
|
|
|
|
|
|
|
| |
src/Makefile.am: C objects in subdir but "AM_PROG_CC_C_O"
not in "configure.ac"
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
|
|
|
|
|
|
|
|
| |
Using exit from shared libraries is unwelcome (automated build systems
flag it) and one should rather return gracefully. Looking at this
particular spot however, while a
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
|
|
|
|
|
|
| |
iftest.c:36:1: warning: control reaches end of non-void function
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
|
|
|
|
| |
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
|
|
|
|
| |
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
|
|
|
|
|
|
|
|
|
|
|
| |
static analysis (analysis based only on compiling of sources, not based on running of binary)
of the code revealed the following problem:
libnfnetlink.c:481: Taking the size of pointer parameter "nlh" is suspicious.
libnfnetlink.c:486: Taking the size of pointer parameter "nlh" is suspicious.
Signed-off-by: Jiri Popelka <jpopelka@redhat.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
|
|\ |
|
| |
| |
| |
| | |
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
|
|/
|
|
|
|
|
|
|
|
|
|
|
| |
We have contacted contributors who are:
- Harald Welte
- Jan Engelhardt
- Eric Leblond
- Patrick McHardy
and happily they agree with the upgrade.
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
|
|
|
|
|
|
| |
Distributions keep their own versions anyway.
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
|
|
|
|
| |
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
|
|
|
|
| |
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
|
|
|
|
| |
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
|
|
|
|
|
|
| |
libtool automatically adds PIC flags as needed.
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
|
|
|
|
| |
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
|
|
|
|
|
|
|
|
|
|
| |
There is no need to call AC_CANONICAL_SYSTEM when only
AC_CANONICAL_HOST is needed. Also, checking for $target is factually
incorrect, since we do not produce object code like a compiler. Use
$host, which specifies the triple/quadruple where the compiled program
is supposed to run.
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
|
|
|
|
|
|
|
|
| |
libtoolize: Consider adding "AC_CONFIG_MACRO_DIR([m4])" to configure.ac and
libtoolize: rerunning libtoolize, to keep the correct libtool macros in-tree.
libtoolize: Consider adding "-I m4" to ACLOCAL_AMFLAGS in Makefile.am.
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
|
|
|
|
|
|
|
|
|
| |
Note: the use of -i seems required, otherwise autoreconf barfs about
missing tools (depcomp, etc.). Since they are provided in the tarballs
as files anyway rather than like previously as symlinks, I do not see
a problem using -i.
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
|
|
|
|
|
|
|
|
| |
Make_global.am:7: "INCLUDES" is the old name for "AM_CPPFLAGS" (or "*_CPPFLAGS")
Also remove unused $(all_includes).
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
|
|
|
|
|
|
|
| |
automake options also need to definitely go into configure.ac,
otherwise they only apply to a single directory.
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
|
|
|
|
| |
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
|
|
|
|
|
|
|
|
| |
Need to unregister the ifadd_handler in err_unregister instead of
unregistering ifdel_handler.
Signed-off-by: Andrey Kuzin <kuzinandrey@yandex.ru>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
|
|
|
|
|
|
|
|
| |
libnfnetlink is licensed under GPLv2.
Reported-by: Jan Engelhardt <jengelh@medozas.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Harald Welte <laforge@netfilter.org>
|
|
|
|
|
|
|
| |
This library has been stable for long time. The main client of
libnfnetlink are the libnetfilter_* libraries.
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
|
|
|
|
|
|
|
| |
This patch adds the function nfnl_addattr8() as it has been requested
by Jozsef Kadlecsik, he needs it for his Netlink-port of ipset.
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch adds the definition of a couple of Netlink socket options
that were included in 2.6.30. They are:
* NETLINK_BROADCAST_SEND_ERROR
* NETLINK_NO_ENOBUFS
This patch also includes the definition of SOL_NETLINK which is
required by set/getsockopt() that is declared in linux/socket.h.
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
|
|
|
|
|
|
|
| |
This patch adds the new interface nfnl_portid() to retrieve the
Netlink portID that has been assigned to a given socket.
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
|
|
|
|
|
|
|
|
|
| |
This patch removes RTMGRP_IPV4_ROUTE and RTMGRP_IPV4_IFADDR which
report event notifications about changes in the route and address
of interfaces. We are only interested in the interface link status
so RTMGRP_LINK is enough.
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
|
|
|
|
|
|
|
|
| |
This patch tags nfnl_talk() and nfnl_listen() as deprecated
functions. The replacements nfnl_query() and nfnl_process() should
be used instead.
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
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 <anton.vazir@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
|
|
|
|
| |
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
|
|
|
|
|
|
|
|
| |
This patch adds the nlif_get_ifflags to get the interface flags.
This patch also modifies the example file to display if a network
interface is running or not.
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
|
|
|
|
|
|
|
| |
This patch fixes a possible re-insertion of an existing entry in
the list of interfaces.
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
|
|
|
|
|
|
| |
Following compilation warning pointed out by Jan Engelhardt, this patch
suppresses the iftable_up function which is of no use in this part of
libnfnetlink library whom goal is to do ifindex to name resolution.
|
|
|
|
|
|
| |
Use `make check' to compile the examples in utils/
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
mark functions as extern C
This is needed when #included from C++.
Reported-by: Simon <turner25@gmail.com>
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Signed-off-by: Patrick McHardy <kaber@trash.net>
|