dect
/
libnl
Archived
13
0
Fork 0
Commit Graph

359 Commits

Author SHA1 Message Date
Thomas Graf e0482794a8 nl: Make nl_recvmsgs() return the number of netlink messages processed 2012-04-21 12:46:01 +02:00
Thomas Graf adbc568735 cache_mngr: Fix memory corruption after resizing
The reallocated part of the enlarged association array was left
uninitialized which would have resulted in trying to free random
pointers.

This was a theoretical bug because it wasn't possible to register
more than 32 cache types since no netlink family supports that
many individual cache types.

Nevertheless this patch fixes the bug and also reduces the default
size of the allocation table and expandations a bit to reduce the
memory footprint slightly.
2012-04-21 12:23:38 +02:00
Thomas Graf e34ed950bd cache_mngr: Automatically allocate socket if needed
The requirement to have the caller provide the socket does not
make much sense. Automatically allocate the socket if none was
provided.

This may also avoid some future abuse of reusing request sockets
for handling notifications.

Also rename cm_handle to cm_sock for clarity (no API change)
2012-04-21 12:11:45 +02:00
Thomas Graf c55acc438b cache_manager: Move documentation to doc/core.txt 2012-04-21 11:38:33 +02:00
Thomas Graf b32011254d cache_mngr: Don't modify callback setup of socket
Instead, clone it and modify a temporary copy. Although it is not
recommended to use the same socket for requests and to serve a
cache manager, this change might prevent some unwanted side effects
if done so.
2012-04-21 10:51:34 +02:00
Thomas Graf 653ea3457a cache_mngr: document uncommon error codes 2012-04-21 09:59:26 +02:00
Nicolas CARRIER f54ac3d55f Memory leak in classid.c
I'm using libnl in a program which I give to valgrind
in order to track memory errors / leaks. When my program
exits, it complains about non-freed memory, allocated in
3 places in classid.c, at lines 280, 284 and 289.

It seems related to the module's constructor classid_init
which allocates resources, with no destructor to free it.

The attached patch tries to fix this issue by registering
a destructor which performs the tree liberation at exit.
2012-04-19 18:51:17 +02:00
Romary Sonrier 965fd78042 missing extended Table attribute for lib/route/
I found a small bug in libnl, about extended table id ( above 256 ).

Signed-off-by: Romary Sonrier <romary@sonrier.com>
Signed-off-by: Thomas Graf <tgraf@redhat.com>
2012-03-06 10:15:30 +01:00
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 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
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
Alexander Sack 9819717444 avoid dangling co_major_cache reference to NL_AUTO_PROVIDE caches 2012-01-11 12:31:40 +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
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 8104b52f75 Fix typo in debug message 2011-10-28 12:30:31 +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 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
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 6d93b831dd route: Remove dead link_cache variable 2011-09-13 23:16:09 +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
Thomas Graf 7b0d063fc1 lib: Use @MAJ_VERSION and @MAJ_MINOR@ for -version-info 2011-09-13 11:47:39 +02:00
Thomas Graf db6de563fe 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.
2011-09-08 15:08:22 +02:00
Bryan Phillippe f1d9e9d52d 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.
2011-09-01 08:39:48 +02:00
Jiri Pirko 7adaad784f 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.

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
2011-08-31 12:35:56 +02:00
Jiri Pirko 17781e44dd socket: fix two typos
Signed-off-by: Jiri Pirko <jpirko@redhat.com>
2011-08-31 09:24:01 +02:00
Jiri Pirko 6faeffe64a socket: introduce nl_socket_modify_err_cb
This function does the same as nl_socket_modify_cb except for error
callback

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
2011-08-31 09:23:58 +02:00
Andrew Rybchenko b367024167 Local port leak on nl_socket_alloc/nl_socket_set_local_port(, 0)
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.
2011-08-30 09:55:46 +02:00
Thomas Graf 4be7adbb71 htb: fix misplaced memset() overwriting already set htb prio option
Reported by Richard Cesar <spidla@spidlas.cz>
2011-08-12 13:47:23 +02:00
Bryan Phillippe d8d96bb236 link: fix unaligned access to 64bit link stats 2011-08-12 10:03:04 +02:00
Thomas Graf 569bec5b5c make port map thread safe
This patch has been in Fedora and RHEL for a while. It adds a mutex
to protect the port map from concurrent thread accesses.

Original patch from Stefan Berger <stefanb@us.ibm.com>.
Modified to use configure.in to check for libpthread
2011-08-11 15:17:56 +02:00
Thomas Graf b5d081d1c9 Avoid freeing memory if vasprintf() failed
Founds this bugfix in Fedora's SOURCES for libnl. Not sure who the
original author is but the bug should be fixed upstream as well.
2011-08-11 15:06:29 +02:00
Pavel Roskin bbe5e94253 Put "break" inside the "if" block in route_compare() 2011-08-11 14:49:51 +02:00
Pavel Roskin 7701c8572f Make some functions and global variables static 2011-08-11 14:49:51 +02:00
Pavel Roskin f9993836ed Remove write-only variables in lib/cache.c 2011-08-11 14:49:51 +02:00
Thomas Graf f1c8d5b0a3 3.1 release 2011-08-11 14:30:24 +02:00
Thomas Graf 70c9371760 Updated link documentation
- API documentation
- developer guide
- enabled doxygen navbar
- fixed css
2011-07-28 16:23:57 +02:00
Thomas Graf 8219cc79f8 VLAN: rtnl_link_is_vlan() function and API documentation 2011-07-21 17:47:00 +02:00
Thomas Graf 16d38a49d1 Use 'link type' instead of 'link info type'
The term 'link type' is much more easier to understand than 'link info type'

rtnl_link_set/get_info_type() left around for backwards compatibility
2011-07-21 16:45:01 +02:00
Thomas Graf 4d2383620b bonding link module 2011-07-21 16:38:04 +02:00
Thomas Graf dea6de42f6 Include IFLA_LINK in link messages 2011-07-21 12:27:52 +02:00
Thomas Graf 63548f5664 documentation updates 2011-07-14 12:48:00 +02:00
Thomas Graf 21d52eabba Support for NLM_F_INTR
Check if a dump was interrupted and needs to be redone
2011-07-14 10:51:49 +02:00
Thomas Graf ca0fc75580 socket: Set SOCK_CLOEXEC if available
Reported by Марк Коренберг <socketpair@gmail.com>
2011-06-15 17:37:28 +02:00
Thomas Graf c881908ac7 neigh: include ndm flags while building message
Reported by jeff courington <jeff_courington@hotmail.com>
2011-06-15 16:23:35 +02:00
Thomas Graf 09210d9619 HTB: Add support for level and direct pkt stats, complete access functions
- Adds support for htb class level and direct packet
  statistics
- Complete all get/set access functions
- Complete error handling
- Documentation
2011-06-09 13:32:13 +02:00
Thomas Graf 053c93fa8a Update local copies of include/linux 2011-06-09 12:56:52 +02:00
Thomas Graf aba3689937 Provide documentation for rtnl_tc_data() and rtnl_tc_data_check() 2011-06-09 12:30:15 +02:00
Thomas Graf 58e0e1eda9 Add nl_rate2str() 2011-06-09 12:29:21 +02:00
Thomas Graf ed69b2a79b Add rtnl_tc_data_check()
Behaves like rtnl_tc_data() but verifies that the traffic control
object is of the expected type.
2011-06-09 12:28:04 +02:00
Thomas Graf 4cb1666fe1 Provide silent variation of nl_cache_require()
Use in addr and tc layer to avoid warnings being printed if no
cache is available.
2011-05-11 09:33:29 +02:00
Thomas Graf 023c662327 Use name "global" instead of "universe" for largest scope
This name is more widespread and easier to understand even though
it is less correct.
2011-05-04 17:47:09 +02:00
Thomas Graf d44c31da5f addr: store link object and provide rtnl_addr_get()
stores rtnl_link object in address if cache is availble. Provide access
via rtnl_addr_get_link() and rtnl_addr_set_link().

Add rtnl_addr_get() which searches a address cache for an address
matching ifindex and local address.
2011-05-03 11:48:14 +02:00
Romary Sonrier cb6a089d80 Adding rule with "From" option doesn't work
OK i found the bug, is is the patch !!

Can someone push it into the git tree ?
Regards,

Romary Sonrier

=========================
My analysis:

I guess that the pay load is *struct fib_rule_hdr*
struct fib_rule_hdr {
__u8 family;
__u8 dst_len;
__u8 src_len;
__u8 tos;

__u8 table;
__u8 res1; /* reserved */
__u8 res2; /* reserved */
__u8 action;

__u32 flags;
};

> [PAYLOAD] 12 octets
> 02 00 00 00 0a 00 00 01 00 00 00 00 ............
so

family = 02 , fine

table = 10, fine
but
src_len =0 !!!! should be 32
2011-05-03 11:40:21 +02:00
Thomas Graf daefa76959 Provide rtnl_tc_get_link() and fix link refcnt
Adds rtnl_tc_get_link() returning the link associated with a tc
object.

Don't clone link associated with tc object when cloning the tc
object, refer to same link instead and bump refcnt.

Fix refcnt leak when assigning link in msg parser.
2011-04-21 14:48:54 +02:00
Thomas Graf 83f14112e2 Fix clone() of AF specific link data
Passed the original link to ao_clone() instead of the new one.
2011-04-21 14:46:06 +02:00
Thomas Graf c18730ddf6 Set tc->tc_link if link cache is available
When parsing tc objects, lookup link in link cache if such a
cache is available.
2011-04-20 16:30:49 +02:00
Thomas Graf fac4885608 Improve readability of classid string representation
1: is more readable than 01:
2011-04-20 16:29:42 +02:00
Thomas Graf 4c6dd3a8bd Expose <netlink/route/link/inet.h> 2011-04-20 11:53:04 +02:00
Thomas Graf 36b04747c7 Support link info types with no payload 2011-04-19 09:57:35 +02:00
Thomas Graf 3d70697e4c Add support for ARPHRD_NONE 2011-04-19 09:57:14 +02:00
Thomas Graf 5a6610190a dummy interface support 2011-04-15 15:31:22 +02:00
Thomas Graf e81814a29f Support for rtnl_link_add()
API for adding virtual links
2011-04-15 15:30:46 +02:00
Thomas Graf 96bc6d6f66 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
2011-04-13 16:42:34 +02:00
Thomas Graf b5918b5ce3 fix line removed by mistake
This line was removed by mistake in the last commit
2011-04-11 12:40:40 +02:00
Thomas Graf 48d543cfdf 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.
2011-04-11 12:34:01 +02:00
Thomas Graf 41fb241b7b link: Provide rtnl_link_delete() to delete virtual links
Takes a link object and extracts ifindex and name to build a deletion request
message to delete virtual network links.
2011-04-10 11:02:47 +02:00
Thomas Graf 0893aafcec link: Make return and argument type match 2011-04-10 10:24:12 +02:00
Thomas Graf 23c27b4738 Provide nl_cache_set_arg{1,2}() to specify cache args
Added based on a RFE. This is required if allocation and
(re)filling is to be splitted.
2011-04-10 10:22:27 +02:00
Thomas Graf ef327ffd44 Provide nl_object_dump_buf() to easily dump to buffers 2011-04-10 10:22:01 +02:00
Thomas Graf 2dbe7d7cfc Initialize dump buffer in case caller missed it
(Set an end to all the bug reports of applications failing
to do so.)
2011-04-10 10:18:04 +02:00
Thomas Graf 7c620500bb trafic class/classifer API improvements and documentation
- removed dead functions in header files
- deprecated rtnl_class_foreach_*() functions due to their missing
  handling possibility of OOM situations
- improved API documentation
2011-03-29 12:41:59 +02:00
Thomas Graf 747b892c91 Qdisc API improvements and documentation
Deprecated the functions rtnl_qdisc_change() and
rtnl_qdisc_build_change_request() for their lack of being able to
specify flags. The new functions rtnl_qdisc_update() and
rtnl_qdisc_build_update_request() may be used instead. The old
functions are still available though. However, rtnl_qdisc_update()
no longer implies NLM_F_REPLACE, it has to specified implicitely
to allow updating a qdisc without risking to replace another qdisc.

Included detailed documentation of qdisc addition/update/deletion.

Introduced APPBUG() macro to let application developer know of
API abuse.
2011-03-25 18:13:19 +01:00
Thomas Graf 23845e942c Add nl_send_sync()
Function which sends message using nl_send_auto(), frees the message and
waits for ACK/error message (if auto-ack is not disabled).
2011-03-25 18:11:52 +01:00
Nicolas Sitbon 7e9d5f69e5 correctly handle the object not found case
Removing non existent route (both ipv4 and ipv6) using
rtnl_route_delete return NLE_FAILURE generic error code. After
investigation, it seems the linux kernel return -ESRCH in that case
(see http://lxr.linux.no/linux+v2.6.38/net/ipv6/route.c#L1367). Same
behaviour apply for removing non existent address. The function
nl_syserr2nlerr (lib/error.c) which is responsible for translating
from kernel error to libnl error doesn't handle ESRCH.
2011-03-25 16:51:31 +01:00
Thomas Graf e4b507e290 Deprecate rtnl_qdisc_foreach_child() and rtnl_qdisc_foreach_cls()
Their usage is not completely safe, it is not possible to handle
the out of memory situation of the allocate filter. It is very
unlikely for this to cause any problem though.

The functions are still accessible but gcc will warn about their
deprecation.
2011-03-24 22:50:11 +01:00
Thomas Graf f523f297f7 Allow NLSYSCONFDIR environment variable to overwrite built-in sysconfdir 2011-03-24 21:14:52 +01:00
Thomas Graf 8d5493418a Cleanup <netlink/route/qdisc.h>
- remove dead prototypes
- reformat
2011-03-24 20:57:43 +01:00
Thomas Graf a62bfdb8e0 Check if all mandatory attributes are present in rtnl_tc_msg_build()
TCA_ATTR_IFINDEX | TCA_ATTR_PARENT | TCA_ATTR_KIND
2011-03-24 17:00:38 +01:00
Thomas Graf 93b6c114a8 Add NLE_NODEV error 2011-03-24 16:56:10 +01:00
Thomas Graf 14fa557ba9 Set default MTU to 1500 2011-03-24 12:59:57 +01:00
Thierry Reding 9f1abddb1a Fix "make distcheck".
This commit adds some missing files (some header files, the files below
/etc and the bison/flex files) to the distribution tarball to ensure
that libnl can be built from the tarballs created using "make dist".

It also adds some incantations to properly generate the flex and bison
output since the generated output is no longer shipped in the tarball.
2011-03-23 16:00:44 +01:00
Thierry Reding 913579b460 Fix out-of-tree build.
This patch fixes out-of-tree build, that is, when building with
$builddir != $srcdir. In such a case, some generated header files are
not found because they live in a different tree and can be fixed by
adding the directories to the compiler's include search path.
2011-03-23 15:51:56 +01:00
Thomas Graf a0fe7a1c9a Omit empty nested attributes
Check for empty nested attributes in nla_nest_end() and omit the
attribute alltogether if is is the case.
2011-03-23 13:39:18 +01:00
Daniel Walter f0603a467b add missing checks for ROUTE_ATTR_MULTIPATH
attached patch adds missing checks for ROUTE_ATTR_MULTIPATH
when dealing with multipath routing.

Affected functions

rtnl_route_remove_nexthop
rtnl_route_get_nexthops
rtnl_route_get_nnexthops
2011-03-22 13:11:09 +01:00
Thomas Graf c1073d6172 Documentation updates
Mostly killing doxygen warnings, some doc updates to caching
2011-03-22 00:40:26 +01:00
Thomas Graf 722a227795 fix module parent references 2011-03-21 16:54:37 +01:00
Thomas Graf 45941f9d5f rename sch -> qdisc 2011-03-21 16:47:42 +01:00
Thomas Graf 8eb5b5532e Unified TC API
Finally got rid of all the qdisc/class/cls code duplication in
the tc module API. The API takes care of allocation/freeing the
tc object specific data.

I hope I got it right this time.
2011-03-21 15:51:52 +01:00
Thomas Graf 5dc897d5de provide function to retrieve htb rate 2011-03-17 17:31:08 +01:00
Thomas Graf 552c85cab7 Hold reference to obj while calling callback of cache iterator 2011-03-17 17:30:32 +01:00
Thomas Graf 33e94038c4 Print debugging info while iterating a cache based on a filter 2011-03-17 16:40:39 +01:00