Thomas Graf [Mon, 7 Nov 2011 11:32:35 +0000 (12:32 +0100)]
link: generic link enslaving API
Adds rtnl_link_enslave() / rtnl_link_release() providing a genreic
link enslaving/release API for use with all link types which use
the IFLA_MASTER property.
Michael Altizer [Sun, 9 Oct 2011 21:02:36 +0000 (17:02 -0400)]
Only use the MULTIPATH attribute when adding routes with more than one next hop.
Only use the MULTIPATH attribute when adding routes with more than one
next hop.
This solves issues with two scenarios:
1. Adding an IPv4 route to a kernel configured without
CONFIG_IP_ROUTE_MULTIPATH=y.
2. Adding an IPv6 route in general, since the MULTIPATH attribute is not
supported there.
Signed-off-by: Michael Altizer <xiche@verizon.net>
Thomas Graf [Fri, 16 Sep 2011 10:57:52 +0000 (12:57 +0200)]
bonding: API to create/enslave/release
Although it has been possible to create bonding devices, enslave and
release using the regular link API. The added API simplifies usage
and hides some of the compatibility logic.
F.e. enslave() and release() will both verify that the master assignment
has in fact been changed and return -NLE_OPNOTSUPP if it did not.
Also the API will make sure to use RTM_NEWLINK or RTM_SETLINK depending
on what is availble.
Examples are provided in src/ as nl-link-enslave.c and nl-link-release.c
Thomas Graf [Tue, 13 Sep 2011 20:58:08 +0000 (22:58 +0200)]
Switch to libtool versioning system
It has been a request that multiple libnl versions should be installabe
in parallel.
In order to achieve this, the basename of the library was changed to
libnl-3 which reflects the 3rd generation of libnl APIs. It also means
that release based library versioning is left behind and libtool
versioning is used instead.
Projects using pkgconfig will automatically link against the new library
basename and will not notice a difference.
The SO versioning is based on the glib model:
current := 100 * minor + micro - revision
revision := revision
age := age (number of backwards compatible versions)
Jan Engelhardt [Wed, 24 Aug 2011 10:09:46 +0000 (12:09 +0200)]
build: always install files into /etc/libnl
I observed that with the RedHat build target in the Open Build
Service, files were put into /etc rather than /etc/libnl.
Self-referential variables are a bad idea, and so just avoid this.
Thomas Graf [Tue, 13 Sep 2011 09:48:18 +0000 (11:48 +0200)]
Install headers in ${includedir}/libnl3
This allows for multiple major versions to be installed in parallel. Pkg-config
files are adapted to provide appropriate cflags to find new header locations.
Thomas Graf [Thu, 8 Sep 2011 13:03:25 +0000 (15:03 +0200)]
fix license of lib/route/pktloc.c
As Jan Engelhardt pointed out, pktloc.c is currently licenses under the GPL
rather than the LGPL. This is a result of its previous existance in src/
which is GPL licensed. I missed to change its license when moving it to
lib/. Since I am the only contributor to the code, I am changing the license
hereby.
Bryan Phillippe [Wed, 31 Aug 2011 18:11:59 +0000 (11:11 -0700)]
64bit unaligned access
This patch fixes an unaligned access for IPv6. On systems with strict alignment requirements, the unaligned access will either result in garbage data or a crash.
Jiri Pirko [Wed, 31 Aug 2011 09:14:43 +0000 (11:14 +0200)]
genl: genl_ctrl_grp_by_name: fix retval in case group id not found
Now the return value in case group id is not find is 0. Change it to
return -NLE_OBJ_NOTFOUND which makes more sense. This should not break
anything because genl_ctrl_grp_by_name is static and called only from
genl_ctrl_resolve_grp. genl_ctrl_resolve_grp already might return
-NLE_OBJ_NOTFOUND.
Thomas Graf [Thu, 21 Jul 2011 14:24:31 +0000 (16:24 +0200)]
more documentation updates
- improved stylesheets for both doxygen and asciidoc
- use of xml doxygen layout
- python script to resolve <<foo>> asciidoc references to
<<foo, title>> based on the target caption
- graphics for netlink and netlink error headers
- more link documentation
Thomas Graf [Wed, 13 Apr 2011 14:42:34 +0000 (16:42 +0200)]
Improve rtnl_link_change() behaviour
- avoid unncessary name change requests
The kernel does not check if the specified IFNAME is different
from the current name. It assumes that if IFNAME and ifindex
are both specified, a name change is requested. Therefore avoid
specyfing IFNAME if ifindex is provided and original and new
name are identical.
- move link building to own function (to allow link add later on)
- error if immutable changes have been made
- better documentation
Thomas Graf [Mon, 11 Apr 2011 10:34:01 +0000 (12:34 +0200)]
API to issue direct GET requests to the kernel
Provide nl_pickup() to pick up an answer from a netlink request and parse
it using the supplied parser.
Add rtnl_link_get_kernel() which sends an RTM_GETLINK to the kernel to
fetch a single link directly from the kernel. This can be faster than
dumping the whole table, especially if lots of links are configured.