dect
/
libnl
Archived
13
0
Fork 0
Commit Graph

484 Commits

Author SHA1 Message Date
Thierry Reding 0b40364150 Add new nl_cache_clone() function.
The function can be used to make a copy of an existing cache. It is very
similar to nl_cache_subset() except that it allows no filtering but
copies every object.

Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Signed-off-by: Thomas Graf <tgraf@redhat.com>
2012-02-16 13:42:49 +01:00
Shriram Rajagopalan a17970b974 Support plug qdisc - queue traffic until explicit release
The plug qdisc supports two operations - plug and unplug. When the
qdisc receives a plug ("buffer") command via netlink request,
packets arriving henceforth are buffered until a corresponding unplug
command is received. Depending on the type of unplug ("release_one"
or "release_indefinite"), the queue can be unplugged indefinitely or
selectively.

The plug qdisc allows a user to implement network output buffering
(aka output commit), used commonly in checkpoint based fault tolerance
systems. It also supports a general purpose queue plug/unplug
functionality.

The associated kernel module is available in David Miller's net-next
tree, commit: c3059be16c9ef29c05f0876a9df5fea21f29724f

This patch introduces userspace tools and API, to control the qdisc
via netlink messages.

Signed-off-by: Shriram Rajagopalan <rshriram@cs.ubc.ca>
Signed-off-by: Thomas Graf <tgraf@redhat.com>
2012-02-14 12:02:04 +01:00
Brett Ciphery a39bb563ab add new function to provide neighbour event parsing
the neighbour parsing function was previously not accessible, so
custom callback functions had to handle the decoding itself.
rtnl_neigh_parse is introduced and implemented in much the same way
as rtnl_route_parse.

Signed-off-by: Brett Ciphery <brett.ciphery@windriver.com>
Signed-off-by: Thomas Graf <tgraf@redhat.com>
2012-01-30 12:54:29 +01:00
Thomas Graf 9cbcbca77d 3.2.7 release
fixes a bug in SO versioning. libtool age was increased incorrectly
which resulted in an incorrect SO version string in the releases
3.2.5 and 3.2.6.
2012-01-25 17:06:15 +01:00
Thomas Graf 4cc1daab3f 3.2.6 release 2012-01-17 12:51:15 +01:00
Thomas Graf 83ab0ae85f man: Remove bogus .LO macro in manpages
Signed-off-by: Thomas Graf <tgraf@redhat.com>
2012-01-17 12:45:06 +01:00
Thomas Graf c857625be0 Update COPYING to fix FSF address
Apparently we have been shiping an outdated version of the LGPL
containing an obsolete address of the FSF.

Signed-off-by: Thomas Graf <tgraf@redhat.com>
2012-01-17 12:38:37 +01:00
Thomas Graf d111b1df47 cli: Use -avoid-version to link cli modules
Signed-off-by: Thomas Graf <tgraf@redhat.com>
2012-01-17 12:34:26 +01:00
Thomas Graf 9015d115f8 3.2.5 release 2012-01-12 13:17:32 +01:00
Torsten Hilbrich 4035e5b5e8 link: fix regression in link message parser
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.
2012-01-12 13:15:31 +01:00
Brett Ciphery 794ac78c56 nl_addr_cmp(): handle prefix length during address comparison
Signed-off-by: Brett Ciphery <brett.ciphery@windriver.com>
2012-01-12 10:18:35 +01:00
Thomas Graf d7222e5dde 3.2.4 release 2012-01-11 12:51:03 +01:00
Alexander Sack 9819717444 avoid dangling co_major_cache reference to NL_AUTO_PROVIDE caches 2012-01-11 12:31:40 +01:00
Thomas Graf 4a7791eca1 dsmark: Add missing declarations for rtnl_class_dsmark_(get|set)_bitmask()
The existing declarations refered to non-existing functions so removing
them is safe.

Signed-off-by: Thomas Graf <tgraf@redhat.com>
2011-11-25 16:09:34 +01:00
Jiri Pirko 847e269c56 rtnl_link_bond_add: allow to allocate bond name in case NULL is given
Signed-off-by: Jiri Pirko <jpirko@redhat.com>
2011-11-11 16:24:53 +01:00
Jiri Pirko ef75c4edf0 link: allow to add/get linkinfo of unknown type
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>
2011-11-11 15:37:03 +01:00
Jan Engelhardt 88940b71f8 build: simplify optional dirs/files in Makefile.am processing 2011-11-11 11:55:29 +01:00
Thomas Graf 32f30b739a release 3.2.3 2011-11-10 15:04:43 +01:00
Jiri Pirko bd7000948d add missing IFLA_MASTER fillup
this makes all set_master functions work.

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
2011-11-07 14:58:53 +01:00
Thomas Graf 03f3a58733 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.
2011-11-07 12:32:35 +01:00
Thomas Graf 659b6d6f65 bump to 3.2.2 2011-10-30 17:07:13 +01:00
Thomas Graf 8104b52f75 Fix typo in debug message 2011-10-28 12:30:31 +02:00
Thomas Graf 9c7593cc9b python: Link against nl-3 and nl-route-3 2011-10-26 10:54:10 +02:00
Thomas Graf 7f20c57e37 link: Ignore bridging notifications in link cache manager
RTM_DELLINK and RTM_NEWLINK bridging notifications should not delete/add
entries to a link cache.
2011-10-21 11:31:58 +02:00
Thomas Graf 2bcd8ecd27 cache: event_filter() cache operation to filter notifications
Certain notifications need to be filtered out and should not be applied to
a cache when a cache is handled by a cache manager.
2011-10-21 11:31:15 +02:00
Thomas Graf 30d3f8c199 utils: Initialize list head after freeing translation list
Problem found and fix proposed by Andrew Kraslavsky <andykras@hotmail.com>
2011-10-10 12:02:33 +02:00
Michael Altizer 790966d69a 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>
2011-10-10 11:44:10 +02:00
Michael Altizer 6c70cf7d72 Don't install CLI header files when --disable-cli has been configured.
Signed-off-by: Michael Altizer <xiche@verizon.net>
2011-10-10 11:44:07 +02:00
Michael Altizer d17379d195 Fix rtnl_link object memory leak when freeing rtnl_addr objects.
Signed-off-by: Michael Altizer <xiche@verizon.net>
2011-10-10 11:44:05 +02:00
Jiří Župka f90dc636cb Add libnl-cli-3.0 to pkg-config tool
Signed-off-by: Jiří Župka <jzupka@redhat.com>
2011-10-10 11:39:24 +02:00
Thomas Graf d3bb7c9cf1 3.2.1 release
Added more details on the changes to where and how libnl is being
instaslled since 3.2.0
2011-09-19 11:47:49 +02:00
Thomas Graf 1c9b175a47 Provide micro version in <netlink/version.h> 2011-09-19 11:28:20 +02:00
Thomas Graf 0d9958e9ef Ingnore src/nl-link-enslave and nl-link-release 2011-09-19 11:24:52 +02:00
Thomas Graf 076909aa82 Bonding: Fix header guard of <netlink/route/link/bonding.h>
(Would be a good idea to change the header guard name when c&p
 an existing header file to create a new one.)
2011-09-16 13:17:04 +02:00
Thomas Graf 15b13ddbde bonding: Install <netlink/route/link/bonding.h> 2011-09-16 13:07:03 +02:00
Thomas Graf 96f17ce146 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
2011-09-16 12:57:52 +02:00
Thomas Graf 5151cbc2f6 link: Eat ACK followed by RTM_NEWLINK when requesting single link
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.
2011-09-14 11:43:10 +02:00
Thomas Graf 67bd56f214 Fix a73cb2f26 fallout to allow building in separate directory
Commit a73cb2f269 missed to change the
EXTRA_DATA section
2011-09-13 23:33:06 +02:00
Thomas Graf 109ea68ac0 tools: Use LDADD and link against .la files instead of LDFLAGS and -llib 2011-09-13 23:21:52 +02:00
Thomas Graf 6d93b831dd route: Remove dead link_cache variable 2011-09-13 23:16:09 +02:00
Thomas Graf b50195c691 addr: Add missing header to <netlink/route/addr.h>
Fixes a gcc warning
2011-09-13 23:13:51 +02:00
Thomas Graf 4c210adcb5 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)
2011-09-13 22:58:08 +02:00
Jan Engelhardt a73cb2f269 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.
2011-09-13 13:19:26 +02:00
Thomas Graf 6e5332b823 Inform users about changed include location at end of configure script 2011-09-13 11:49:41 +02:00
Thomas Graf 226b387557 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.
2011-09-13 11:48:18 +02:00
Thomas Graf 7b0d063fc1 lib: Use @MAJ_VERSION and @MAJ_MINOR@ for -version-info 2011-09-13 11:47:39 +02:00
Thomas Graf 5a59cf85d1 asciidoc xhtml stylesheet 2011-09-13 11:07:23 +02:00
Thomas Graf 2a37ab5f34 prepare for 3.2 release
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.
2011-09-08 15:34:31 +02:00
Thomas Graf 80569bb242 remove dist lines for non existing files 2011-09-08 15:34:31 +02:00
Thomas Graf 7ac948c643 Remove GPL-3.0 license file.
There is no code licensed GPL-3.0 so we might as well remove this file.
2011-09-08 15:08:22 +02:00