| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
This fixes `make distcheck'.
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
|
|
|
|
| |
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
|
|
|
|
|
|
|
|
|
| |
The function may return -1 (and set errno). Assume it will leave
addr_len value unchanged, so checking is necessary to not hide the
error.
Fixes: 4248314d40187 ("nfnl: fix compilation warning with gcc-4.7")
Signed-off-by: Phil Sutter <phil@nwl.cc>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Compiler complained about empty prefetch() macro:
| ../include/linux_list.h:385:66: warning: right-hand operand of comma expression has no effect [-Wunused-value]
| 385 | for (pos = list_entry((head)->next, typeof(*pos), member), \
| | ^
Use nftables' variant instead which gcc seems to like more.
Fixes: 36d2ed3de20a3 ("major cleanup of index2name infrastructure: use linux list (and fix leak in the nlif_close path)")
Signed-off-by: Phil Sutter <phil@nwl.cc>
|
|
|
|
|
|
|
|
|
|
|
| |
src/iftable.c: Update group description
src/libnfnetlink.c: - Re-work main page (which was based on the misconception
that this library always gets used)
- Update group description
Signed-off-by: Duncan Roe <duncan_roe@optusnet.com.au>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The documentation was written in the days before doxygen required groups or even
doxygen.cfg, so create doxygen.cfg.in and introduce one \defgroup per source
file, encompassing pretty-much the whole file.
Also add a tiny \mainpage.
Added:
doxygen.cfg.in: Same as for libmnl except FILE_PATTERNS = *.c libnfnetlink.h
Updated:
configure.ac: Create doxygen.cfg
src/iftable.c: Add defgroup
src/libnfnetlink.c: Add mainpage and defgroup
Signed-off-by: Duncan Roe <duncan_roe@optusnet.com.au>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
They are:
recalc_rebind_subscriptions
rtnl_close
rtnl_dump_type
rtnl_handler_register
rtnl_handler_unregister
rtnl_open
rtnl_parse_rtattr
rtnl_receive
rtnl_receive_multi
Signed-off-by: Yury Gribov <tetra2005@gmail.com>
Signed-off-by: Florian Westphal <fw@strlen.de>
|
|
|
|
|
|
| |
The headers already include <linux/types.h> that defines this datatype.
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
|
|
|
|
|
| |
Signed-off-by: Felix Janda <felix.janda@posteo.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
|
|
|
|
|
| |
Signed-off-by: Felix Janda <felix.janda@posteo.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
==12195== Syscall param socketcall.sendto(msg) points to uninitialised byte(s)
==12195== at 0x51209C3: __sendto_nocancel (syscall-template.S:81)
==12195== by 0x53E4D12: nfnl_send (libnfnetlink.c:391)
==12195== by 0x53E6952: nfnl_query (libnfnetlink.c:1569)
==12195== by 0x4E344AF: __build_send_cfg_msg.isra.1 (libnetfilter_log.c:143)
==12195== by 0x4E34710: nflog_bind_group (libnetfilter_log.c:413)
==12195== by 0x400CB1: main (nfulnl_test.c:77)
==12195== Address 0x7fefff3e9 is on thread 1's stack
This patch sets to zero the padding that is included to align the
attribute payload.
Reported-by: Ivan Homoliak <xhomol11@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
|
|
|
|
|
| |
Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
|
|
|
|
|
|
|
|
| |
Since (3956761 license: upgrade to GPLv2+), we upgraded to GPLv2+,
propagate that changes to src/iftable.c and src/rtnl.c
Reported-by: Thomas Woerner <twoerner@redhat.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
|
|
|
|
|
|
|
| |
am/ltlibrary.am: warning: 'libnfnetlink.la': linking libtool libraries
using a non-POSIX archiver requires 'AM_PROG_AR' in 'configure.ac'
Signed-off-by: Jan Engelhardt <jengelh@inai.de>
|
|
|
|
| |
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>
|