| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| |
| |
| |
| |
| |
| |
| |
| | |
9 digits for for B/s don't make sense to me. It's just breaks the alignment.
[thaller@redhat.com: whitespace fixes]
Signed-off-by: Thomas Haller <thaller@redhat.com>
|
|/
|
|
|
|
|
|
| |
I added all the netem attributes (except for limit) to the NL_DUMP_DETAILS section.
[thaller@redhat.com: whitespace fixes]
Signed-off-by: Thomas Haller <thaller@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
| |
CMSG_NXTHDR requires <linux/socket.h>. This fix a build error with the musl
C library:
```
undefined reference to `__cmsg_nxthdr'
```
https://github.com/thom311/libnl/pull/83
|
|
|
|
|
|
|
| |
rtnl_link_ipvlan_get_mode() was just introduced as new API. Fix the
error code to return -NLE_INVAL instead of -NLE_OPNOTSUPP.
http://lists.infradead.org/pipermail/libnl/2015-June/001921.html
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Suppose the case:
1. message have already some payload
2. malloc() failed
In that case:
1. msg->queue_msg_payload become NULL
2. msg->queue_msg_payload_len stay non-zero
Now when malloc() error occurs, nothing changed.
https://github.com/thom311/libnl/pull/83
|
|\
| |
| |
| | |
https://github.com/thom311/libnl/pull/84
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
In case doc/configure.ac hasn't found asciidoc or any of its
prerequisites (such as pygmentize), make shouldn't try to run it.
One such case ("gendoc" target) is covered while the other
("%.html" target) is not. Fix it by adding a proper ifdef.
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
A check for python binary that was originally introduced by commit
183e869 is needed because python is used for a couple of preprocessors
(doxygen-link.py and resolve-asciidoc-refs.py) and therefore it is
impossible to build docs without python.
While it is right to check for python, the check was both wrong and
excessive. Instead of just checking for python binary, it checked for
various versions of python and set a few variables that are not needed
here. More to say, the absense of python binary was not treated as
being fatal like it should.
Fix both problems by using AC_CHECK_PROG for python, terminating the
build in the same way as with doxygen absense. Also, remove the
m4/ax_python.m4 which is no longer needed.
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
|
| |
| |
| |
| |
| |
| |
| |
| | |
These files, as well as the proper configure.ac calls, were added
by commit f443be6, but the calls were later removed by commit b4b853e,
so these are no longer needed.
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
|
|/
|
|
|
|
|
|
|
| |
This file is no longer needed since commit db13843 which copied it
to doc/ subdir and removed the call to AX_PYTHON from configure.ac.
That commit should have moved it rather than copied, let's fix it.
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
|
|
|
|
|
|
|
|
|
|
|
| |
The ifi_change field can be set with the mask of the flags that need
to be changed as part of the link message to the kernel. This means only
the specific flags that have been changed will be modified in the kernel,
rather than the entire flags entry.
[thaller@redhat.com: add capability to indicate the change in behavior]
https://github.com/thom311/libnl/pull/86
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In the future kernel might support more modes. Don't be so
strict in rtnl_link_ipvlan_set_mode() and accept any uint16
mode.
This way when adding new modes, rtnl_link_ipvlan_set_mode() does not
need to be changed.
If the user passes an invalid value and sends a message to the kernel,
it will be rejected there.
http://lists.infradead.org/pipermail/libnl/2015-June/001902.html
Fixes: 7de5be85bf9aa3eb9f022e4813226135e89adec2
Signed-off-by: Thomas Haller <thaller@redhat.com>
|
|
|
|
|
|
|
|
| |
http://lists.infradead.org/pipermail/libnl/2015-June/001902.html
Fixes: 7de5be85bf9aa3eb9f022e4813226135e89adec2
Signed-off-by: Thomas Haller <thaller@redhat.com>
|
|\
| |
| |
| | |
https://github.com/thom311/libnl/pull/79
|
| |
| |
| |
| |
| |
| |
| |
| | |
Commit 6a9335f101e22cd5eaba4dfcf0a44e2c3097b4ab fixed a typo in the
string-to-flags conversion. At least for rtnl_neigh_str2state()
we want to continue to parse "norarp" for backward compatiblity.
Signed-off-by: Thomas Haller <thaller@redhat.com>
|
|/
|
|
|
|
|
|
|
|
| |
Translate NUD_NOARP to "noarp", instead of "norarp".
https://github.com/thom311/libnl/pull/79
Fixes: 44d362409d5469aed47d19e7908d19bd194493a4
Signed-off-by: Thomas Haller <thaller@redhat.com>
|
|\
| |
| |
| | |
http://lists.infradead.org/pipermail/libnl/2015-June/001902.html
|
| |
| |
| |
| |
| | |
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: Thomas Haller <thaller@redhat.com>
|
|/
|
|
|
| |
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: Thomas Haller <thaller@redhat.com>
|
|
|
|
| |
https://github.com/thom311/libnl/pull/78
|
|
|
|
|
|
|
|
| |
Instead of NL_CAPABILITY_NL_RECV_FAIL_TRUNK_NO_PEEK.
Fixes: bbdcaea9a779885fedc04817dcc11953a377bfd5
Signed-off-by: Thomas Haller <thaller@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If recvmsg indicates that the message read was truncated libnl retries
to read the complete message after increasing the message buffer. This
only works if the message flags MSG_PEEK | MSG_TRUNC are set. If
NL_MSG_PEEK is not enabled on the nl_sock structure, flags are left
empty and the rest of the truncated message is discarded, hence a
subsequent recvmsg returns the next message (in case of a multipart
message, the NLMSG_DONE) is read and returned.
This patch aborts message processing if the message was truncated and
the NL_MSG_PEEK flags was not activated for the nl_sock structure.
http://lists.infradead.org/pipermail/libnl/2015-June/001888.html
[thaller@redhat.com: add NL_CAPABILITY_NL_RECV_FAIL_TRUNK_NO_PEEK]
Signed-off-by: Thomas Egerer <hakke_007@gmx.de>
Signed-off-by: Thomas Haller <thaller@redhat.com>
|
|
|
|
| |
Signed-off-by: Thomas Haller <thaller@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Update the private copy of linux/if_arp.h and hook up the not yet
defined ARPHRD_* types in the llprotos translation table. Reorder the
entries such that they correspond to the order they're defined in
linux/if_arp.h. Also remove the #ifdef guards since these are
unnecessary given that the private copy of the kernel header is used.
http://lists.infradead.org/pipermail/libnl/2015-May/001883.html
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: Thomas Haller <thaller@redhat.com>
|
|
|
|
|
|
| |
http://lists.infradead.org/pipermail/libnl/2015-May/001880.html
Signed-off-by: Thomas Haller <thaller@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The return value of the *nl_send_simple() functions is
inconsistent and not according to the documentation.
nl_send_simple() is document to return the number of bytes sent.
Other *nl_send_simple() functions are documented to return 0 on
success -- for the most part.
See also commit b70174668b9867de573cf51471bc98bfe7fd2bc3 which
changed behavior of nl_rtgen_request() to be according to documenation.
Don't change behavior again, only adjust the documentation.
http://lists.infradead.org/pipermail/libnl/2015-May/001872.html
Reported-by: Xiao Jia <stfairy@gmail.com>
Signed-off-by: Thomas Haller <thaller@redhat.com>
|
|
|
|
|
|
| |
nl_send_simple()
Signed-off-by: Thomas Haller <thaller@redhat.com>
|
|\
| |
| |
| |
| |
| |
| | |
Disable debug macro in swig API to reduce the noise
and expose a couple of functions.
https://github.com/thom311/libnl/pull/77
|
| |
| |
| |
| |
| |
| |
| | |
Allow using genlmsg_hdr() function and make the header fields
accessible in Python scripts.
Signed-off-by: Arend van Spriel <aspriel@gmail.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
Adding nla_put() to the capi using a typemap on the input
parameter which needs to be either a str or bytearray.
Otherwise a SWIG exception with be thrown.
Signed-off-by: Arend van Spriel <aspriel@gmail.com>
|
| |
| |
| |
| |
| |
| | |
Adding functions to add/drop membership to single multicast group.
Signed-off-by: Arend van Spriel <aspriel@gmail.com>
|
|/
|
|
|
|
|
|
| |
The define was left enabled during development on netlink (and genl)
python swig api. It is a bit annoying in production release so disable
the define.
Signed-off-by: Arend van Spriel <aspriel@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
If xfrmnl_sel_alloc() returns NULL, the daddr and saddr members are
still accessed, leading to a potential NULL dereference. The same is the
case for xfrmnl_user_tmpl_alloc(). Fix this by returning NULL right away
if allocation fails.
http://lists.infradead.org/pipermail/libnl/2015-May/001874.html
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: Thomas Haller <thaller@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
| |
The tc_kind member of struct rtnl_tc (and all types which can be
converted to it) is defined as an array and can thus never be
NULL.
http://lists.infradead.org/pipermail/libnl/2015-April/001869.html
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: Thomas Haller <thaller@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add translations for NETLINK_RDMA and NETLINK_CRYPTO to nlfamilies,
allowing to use nl_nlfamily2str() and nl_str2nlfamily() for these
families.
This makes it necessary to update the private copy of linux/netlink.h
and also includes the rename of NETLINK_INET_DIAG to NETLINK_SOCK_DIAG
in upstream commit 7f1fb60c4fc9fb29 ("inet_diag: Partly rename inet_ to
sock_") and the removal of the duplicate NLMSG_ALIGN in the
NLMSG_LENGTH() macro in upstream commit a88b9ce5ad4fc633 ("netlink:
remove duplicated NLMSG_ALIGN").
http://lists.infradead.org/pipermail/libnl/2015-April/001868.html
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: Thomas Haller <thaller@redhat.com>
|
|
|
|
| |
Signed-off-by: Thomas Haller <thaller@redhat.com>
|
|
|
|
|
|
|
|
|
| |
[thaller@redhat.com: modified patch to parse NDA_VLAN and diff vlan]
http://lists.infradead.org/pipermail/libnl/2015-March/001861.html
Signed-off-by: Jonas Johansson <jonasj76@gmail.com>
Signed-off-by: Thomas Haller <thaller@redhat.com>
|
|
|
|
| |
Signed-off-by: Thomas Haller <thaller@redhat.com>
|
|
|
|
|
|
|
|
| |
Also reserve a range of capabilities (0x7000 to 0x7FFF) that we won't
use upstream. Add a macro NL_CAPABILITY_IS_USER_RESERVED() to check
if the capability is in that range.
Signed-off-by: Thomas Haller <thaller@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, some cli programs were installed to sbin/
and most were not installed at all.
Now, by default install all of them to bin/ directory.
But extend the configure option to allow specifying
'no-inst', 'bin', or 'sbin'.
Acked-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: Thomas Haller <thaller@redhat.com>
|
|
|
|
| |
Signed-off-by: Thomas Haller <thaller@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Including linux/if.h in netlink/route/link.h causes issues
in cases where libnl is used in conjuntion with other third
party libraries that include net/if.h. Seems to be a long
checkered history of symbol collisions between these two
files. As it turns out, including linux/if.h from within
netlink/route/link.h is actually unecessary. I resurrected
a forgotten path from this thread:
http://lists.infradead.org/pipermail/libnl/2012-April/000525.html
By removing the include as the patch suggests we can get
around the nuissance of the symbol collisions.
https://github.com/thom311/libnl/pull/73
Signed-off-by: Thomas Haller <thaller@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In the past, libnl3 had only one section (libnl_3) in the
linker version script. Between 3.2.25 and 3.2.26 release,
this was cleaned up and new symbols were added to libnl_3_2_26
section. Commit d2a30fb also moved new symbols since 3.2.25
to that section.
Fedora 21 and later already uses these symbols in the previous
version (@libnl_3). Updating there would break symbol lookup.
As we have users of the unstable version from pre-3.2.26, move
those symbols back. Note that this now breaks unstable users since
d2a30fb (5 weeks ago) -- which probably are much fewer affected
users.
Fixes: d2a30fbb36d668fe64f43bddfc9c53ee0362334f
Signed-off-by: Thomas Haller <thaller@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
With support for socket option SO_PROTOCOL we don't need the protocol
argument to nl_socket_set_fd(). Maybe we should drop the protocol argument
and just not support nl_socket_set_fd() on older systems. But instead
keep the argument and allow passing -1 to autodetect it.
If the user sets a protocol option, we check via getsockopt() that the
value is correct and error out otherwise.
On older kernels, the user must set the value. Otherwise
nl_socket_set_fd() will fail.
Signed-off-by: Thomas Haller <thaller@redhat.com>
|
|
|
|
| |
Signed-off-by: Thomas Haller <thaller@redhat.com>
|
|
|
|
|
|
| |
Fixes: e7d57da0ddad9097962ebfec4f5202b756ed93c9
Signed-off-by: Thomas Haller <thaller@redhat.com>
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This is based on the patch by sagil@infinidat.com, but heavily modified.
Add a function nl_socket_set_fd(), I renamed it from nl_connect_fd().
Now nl_connect() and nl_socket_set_fd() are implemented independently as
they share little code. But they have similar functionality:
to initialize a libnl socket and set it's file descriptor.
A user who wants libnl to setup the socket can continue to use nl_connect().
A user with special requirements should setup the socket entirely. That includes
calling socket() (with or without SOCK_CLOEXEC), bind(), setting buffer size.
For the same reason I dropped nl_create_fd(). It didn't do much more then
calling socket() -- which the user can do directly.
https://github.com/thom311/libnl/pull/68
Signed-off-by: Thomas Haller <thaller@redhat.com>
|
|/
|
|
|
|
|
|
|
|
|
|
| |
- Added option to create socket (fd) without bind.
It is now possible to forward the socket fd to another child process...
...later use nl_connect_fd() to connect to socket from the child process.
- Added option to disable CLOEXEC even if defined (in socket.h)
'nl_socket_enable_cloexec' & 'nl_socket_disable_cloexec'
No change to current default behavior.
Signed-off-by: Sagi Lowenhardt <sagil@infinidat.com>
|
|
|
|
|
|
|
|
| |
s_local.nl_pid is used to track the generated port unless NL_OWN_PORT is set.
Ensure that getsockname() doesn't overwrite the value and possibly reset
the local port manually to release the generated port.
Signed-off-by: Thomas Haller <thaller@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The flag was not actually used.
NL_SOCK_BUFSIZE_SET was only set by nl_socket_set_buffer_size().
Note that you can only call nl_socket_set_buffer_size() on a socket that
is already connected via nl_connect().
On first call, nl_connect() would always see NL_SOCK_BUFSIZE_SET unset, and
call nl_socket_set_buffer_size().
Since the flag was never unset, when trying to connect a socket a second
time, we would not set the buffer size again. Which was a bug.
Signed-off-by: Thomas Haller <thaller@redhat.com>
|