summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* 3.2.5 releaselibnl3_2_5Thomas Graf2012-01-121-3/+3
|
* link: fix regression in link message parserTorsten Hilbrich2012-01-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In a simple test program that queries the source IP for a given destination address I get a crash in the call to rtnl_link_alloc_cache. Here is the stack trace (created with version 3.2.4): Program received signal SIGSEGV, Segmentation fault. 0xb7eb7553 in strlen () from /lib/libc.so.6 (gdb) bt #0 0xb7eb7553 in strlen () from /lib/libc.so.6 #1 0xb7eb7285 in strdup () from /lib/libc.so.6 #2 0xb7fcc305 in nla_strdup (nla=0x0) at attr.c:1033 #3 0xb7f9c173 in link_msg_parser (ops=0xb7fc2940, who=0x804b330, n=0x804c3e8, pp=0xbffffbf8) at route/link.c:486 #4 0xb7fcd485 in nl_cache_parse (ops=0xb7fc2940, who=0x804b330, nlh=0x804c3e8, params=0xbffffbf8) at cache.c:724 #5 0xb7fcd547 in update_msg_parser (msg=0x804b328, arg=0xbffffbb8) at cache.c:531 #6 0xb7fd1f25 in nl_cb_call (cb=<optimized out>, msg=<optimized out>, type=<optimized out>) at ../include/netlink-local.h:126 #7 recvmsgs (cb=<optimized out>, sk=<optimized out>) at nl.c:729 #8 nl_recvmsgs (sk=0x804b2d0, cb=0x804b368) at nl.c:780 #9 0xb7fcd5fd in __cache_pickup (sk=0x804b2d0, cache=<optimized out>, param=0xbffffbf8) at cache.c:560 #10 0xb7fcd83f in nl_cache_pickup (sk=0x804b2d0, cache=0x804b308) at cache.c:593 #11 0xb7fcd8c8 in nl_cache_refill (sk=0x804b2d0, cache=0x804b308) at cache.c:780 #12 0xb7f9d1fc in rtnl_link_alloc_cache (sk=0x804b2d0, family=4, result=0xbffffcd4) at route/link.c:868 #13 0x08048fd0 in libnl_init (data=<optimized out>) at helper_route.c:60 #14 iproute_get_source (destination=0xbffffeff "127.0.0.1", source=0xbffffd0f "\b\004c\370\267\364_\370\267\260\224\004\b8\375\377\277e\024\347\267\320\016\377\267\273\224\004\b\364_\370\267\260\224\004\b", source_size=17) at helper_route.c:105 #15 0x08048e6a in main (argc=2, argv=0xbffffde4) at ip_route_get.c:25 The attached patch (against 3.2.4) solves the problem, fixing something that looks like a typo. The bug is still present in current Git master.
* nl_addr_cmp(): handle prefix length during address comparisonBrett Ciphery2012-01-121-1/+4
| | | | Signed-off-by: Brett Ciphery <brett.ciphery@windriver.com>
* 3.2.4 releaselibnl3_2_4Thomas Graf2012-01-111-3/+3
|
* avoid dangling co_major_cache reference to NL_AUTO_PROVIDE cachesAlexander Sack2012-01-111-2/+5
|
* dsmark: Add missing declarations for rtnl_class_dsmark_(get|set)_bitmask()Thomas Graf2011-11-251-3/+3
| | | | | | | The existing declarations refered to non-existing functions so removing them is safe. Signed-off-by: Thomas Graf <tgraf@redhat.com>
* rtnl_link_bond_add: allow to allocate bond name in case NULL is givenJiri Pirko2011-11-111-4/+1
| | | | Signed-off-by: Jiri Pirko <jpirko@redhat.com>
* link: allow to add/get linkinfo of unknown typeJiri Pirko2011-11-112-22/+55
| | | | | | | | store type kind in rtnl_link independently. That would allow to use this value even if type_ops are not present. This allows for example to create devices of type unknown to libnl. Signed-off-by: Jiri Pirko <jpirko@redhat.com>
* build: simplify optional dirs/files in Makefile.am processingJan Engelhardt2011-11-111-11/+7
|
* release 3.2.3libnl3_2_3Thomas Graf2011-11-101-2/+2
|
* add missing IFLA_MASTER fillupJiri Pirko2011-11-071-0/+3
| | | | | | this makes all set_master functions work. Signed-off-by: Jiri Pirko <jpirko@redhat.com>
* link: generic link enslaving APIThomas Graf2011-11-072-0/+129
| | | | | | 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.
* bump to 3.2.2libnl3_2_2Thomas Graf2011-10-301-2/+2
|
* Fix typo in debug messageThomas Graf2011-10-281-1/+1
|
* python: Link against nl-3 and nl-route-3Thomas Graf2011-10-261-2/+2
|
* link: Ignore bridging notifications in link cache managerThomas Graf2011-10-211-0/+14
| | | | | RTM_DELLINK and RTM_NEWLINK bridging notifications should not delete/add entries to a link cache.
* cache: event_filter() cache operation to filter notificationsThomas Graf2011-10-212-0/+13
| | | | | Certain notifications need to be filtered out and should not be applied to a cache when a cache is handled by a cache manager.
* utils: Initialize list head after freeing translation listThomas Graf2011-10-101-0/+2
| | | | Problem found and fix proposed by Andrew Kraslavsky <andykras@hotmail.com>
* Only use the MULTIPATH attribute when adding routes with more than one next hop.Michael Altizer2011-10-101-1/+11
| | | | | | | | | | | | 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>
* Don't install CLI header files when --disable-cli has been configured.Michael Altizer2011-10-101-11/+15
| | | | Signed-off-by: Michael Altizer <xiche@verizon.net>
* Fix rtnl_link object memory leak when freeing rtnl_addr objects.Michael Altizer2011-10-101-0/+1
| | | | Signed-off-by: Michael Altizer <xiche@verizon.net>
* Add libnl-cli-3.0 to pkg-config toolJiří Župka2011-10-103-1/+17
| | | | Signed-off-by: Jiří Župka <jzupka@redhat.com>
* 3.2.1 releaselibnl3_2_1Thomas Graf2011-09-191-8/+20
| | | | | Added more details on the changes to where and how libnl is being instaslled since 3.2.0
* Provide micro version in <netlink/version.h>Thomas Graf2011-09-191-0/+1
|
* Ingnore src/nl-link-enslave and nl-link-releaseThomas Graf2011-09-191-0/+2
|
* Bonding: Fix header guard of <netlink/route/link/bonding.h>Thomas Graf2011-09-161-2/+2
| | | | | (Would be a good idea to change the header guard name when c&p an existing header file to create a new one.)
* bonding: Install <netlink/route/link/bonding.h>Thomas Graf2011-09-161-0/+1
|
* bonding: API to create/enslave/releaseThomas Graf2011-09-165-1/+311
| | | | | | | | | | | | | | 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
* link: Eat ACK followed by RTM_NEWLINK when requesting single linkThomas Graf2011-09-141-0/+4
| | | | | | When requesting a single link with RTM_GETLINK (no dump) the RTM_NEWLINK carrying the answer will be followed by an ACK we have to wait for.
* Fix a73cb2f26 fallout to allow building in separate directorylibnl3_2Thomas Graf2011-09-131-1/+1
| | | | | Commit a73cb2f26932d90a2d47a28e9c524e7f33dcffbd missed to change the EXTRA_DATA section
* tools: Use LDADD and link against .la files instead of LDFLAGS and -llibThomas Graf2011-09-131-1/+7
|
* route: Remove dead link_cache variableThomas Graf2011-09-131-3/+0
|
* addr: Add missing header to <netlink/route/addr.h>Thomas Graf2011-09-131-0/+1
| | | | Fixes a gcc warning
* Switch to libtool versioning systemThomas Graf2011-09-1310-55/+131
| | | | | | | | | | | | | | | | | | 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)
* build: always install files into /etc/libnlJan Engelhardt2011-09-131-2/+2
| | | | | | 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.
* Inform users about changed include location at end of configure scriptThomas Graf2011-09-131-0/+15
|
* Install headers in ${includedir}/libnl3Thomas Graf2011-09-135-5/+7
| | | | | 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.
* lib: Use @MAJ_VERSION and @MAJ_MINOR@ for -version-infoThomas Graf2011-09-131-1/+1
|
* asciidoc xhtml stylesheetThomas Graf2011-09-131-0/+333
|
* prepare for 3.2 releaseThomas Graf2011-09-086-10/+10
| | | | | Fall back to using libnl-*.3.pc files. It may be common to have multiple generations of libnl installed but unlikely within the same major release.
* remove dist lines for non existing filesThomas Graf2011-09-081-7/+0
|
* Remove GPL-3.0 license file.Thomas Graf2011-09-081-676/+0
| | | | There is no code licensed GPL-3.0 so we might as well remove this file.
* fix license of lib/route/pktloc.cThomas Graf2011-09-081-3/+4
| | | | | | | | 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.
* Do not require python and swig to be presentThomas Graf2011-09-081-5/+0
| | | | | Allows building without python and swig. Readd this using --enable-python at some point.
* 64bit unaligned accessBryan Phillippe2011-09-011-7/+17
| | | | 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.
* genl: genl_ctrl_grp_by_name: fix retval in case group id not foundJiri Pirko2011-08-311-1/+1
| | | | | | | | | | 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. Signed-off-by: Jiri Pirko <jpirko@redhat.com>
* socket: fix two typosJiri Pirko2011-08-311-2/+2
| | | | Signed-off-by: Jiri Pirko <jpirko@redhat.com>
* socket: introduce nl_socket_modify_err_cbJiri Pirko2011-08-312-0/+17
| | | | | | | This function does the same as nl_socket_modify_cb except for error callback Signed-off-by: Jiri Pirko <jpirko@redhat.com>
* nl-link-name2ifindex: fix usage textJiri Pirko2011-08-301-1/+1
| | | | Signed-off-by: Jiri Pirko <jpirko@redhat.com>
* Local port leak on nl_socket_alloc/nl_socket_set_local_port(, 0)Andrew Rybchenko2011-08-301-1/+8
| | | | | | | | | | | | | | | | | | I've found a bug in the following scenario (fragment of code): while (1) { struct nl_sock *sk = nl_socket_alloc(); if (sk == NULL) { fprintf(stderr, "Failed to allocate nl socket\n"); break; } nl_socket_set_local_port(sk, 0); nl_socket_free(sk); } The problem is that nl_socket_set_local_port(, 0) does not release local port if it is allocated before.