summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* 3.2.13 releaselibnl3_2_13Thomas Graf2012-09-031-2/+2
|
* libnl-3.2.12 - ./configure --disable-doc: error: conditional "LINK_DOC" was ↵Jeroen Roovers2012-09-031-4/+4
| | | | | | | | | | | never defined. \ Usually this means the macro was only invoked conditionally. configure: error: conditional "LINK_DOC" was never defined. Usually this means the macro was only invoked conditionally. Attached patch provided by Martin Jansa. See also https://bugs.gentoo.org/show_bug.cgi?id=433565
* Merge branch 'asprintf' of https://github.com/socketpair/libnlThomas Graf2012-08-311-10/+14
|\
| * asprintf related fixed in yy parserКоренберг Марк2012-08-301-10/+14
| | | | | | | | | | | | | | | | | | | | | | | | 1. According to man asprintf: If memory allocation wasn't possible, or some other error occurs, these functions will return -1, and the contents of strp is undefined. 2. Sometimes, errp was not filled at all. In high-level code, free(errp) will called, so segmantation fault may appear in case of error in parser 3. The most cases of using asprintf is to report about allocation fail. So, probability of allocation of asprintf buffer is very high. And that will lead to trash in errp. 4. For simple casses I decide to replace asprintf with strdup
* | Merge branch 'doxyfile' of https://github.com/socketpair/libnlThomas Graf2012-08-312-1802/+1
|\ \
| * | Remove auto-generated Doxyfile from gitКоренберг Марк2012-08-302-1802/+1
| |/ | | | | | | Also, add it to gitignore
* | doc: Update Doxyfile.in to latest syntaxThomas Graf2012-08-311-107/+263
| |
* | genl_ctrl_probe_by_name: fix checking of genlmsg_put() return valueКоренберг Марк2012-08-301-2/+2
|/ | | | It's a pointer! not an error code :) nasty bugs
* Address comparison bug fixedКоренберг Марк2012-08-301-1/+2
| | | | Bug introduced in 794ac78c5618ee81a45e4f58694ee27b3403ebd7
* More clean NL_AUTO_PORT and NL_AUTO_SEQ usage in nl_complete_msgКоренберг Марк2012-08-301-2/+2
|
* 3.2.12 releaselibnl3_2_12Thomas Graf2012-08-302-4/+4
|
* configure: Check for pygmentize when building docsThomas Graf2012-08-301-0/+10
| | | | Signed-off-by: Thomas Graf <tgraf@suug.ch>
* doc: Update Doxyfile config to latest releaseThomas Graf2012-08-302-1/+1802
|
* route: Document ROUTE_CACHE_CONTENT flagThomas Graf2012-08-302-2/+11
| | | | Signed-off-by: Thomas Graf <tgraf@suug.ch>
* configure: Check for graphviz and source-highlight before building documentationThomas Graf2012-08-301-0/+20
| | | | Signed-off-by: Thomas Graf <tgraf@suug.ch>
* Prevent potential socket file descriptor leakКоренберг Марк (дома)2012-08-301-2/+9
| | | | | | | | This may happen when passing connected socket to nl_cache_mngr_alloc(). Now, nl_connect() will return error trying to connect already connected socket. Also, dont call close(-1) if socket() fails.
* Fix warning "not checking return value of fscanf" in lib/utils.c: ↵Коренберг Марк (дома)2012-08-301-4/+10
| | | | | | | | get_psched_settings Also, change internal variables type from uint32_t to unsigned int. Correct scanf format string should contain "SCNx32" instead of just "x", but I decide not to fix that and just changed variable type.
* Fix typo in textual description in ct_dump_stats()Коренберг Марк (дома)2012-08-301-2/+2
| | | | Bug introduced in a0f1c0e281ee78ab8ee874bbb6c2140c12101284
* "%llu" replaced with "%" PRIu64Коренберг Марк (дома)2012-08-306-29/+40
| | | | | | | | | | | | | | | | | | | | | On some architectures, uint64_t is defined as: typedef unsigned long long int __u64; on another architectures as: typedef unsigned long int __u64; So, according to man 3 printf, uint64_t should be printed as "%llu" on some architectures, and as "%lu" on another. The same for scanf. To eliminate that challenge, there is inttypes.h, in which appropriate constants are defined for current architecture. 32-bit types (and even 16 and 8 bit types) should be printed using such constants if printed variable defined as uint_XXXt or intXXXt type. But in reality 32-bit and less types does not gain run-time error (except in scanf), because they pushed to stack as 32-bit values at least. So, I decide not to fix that.
* Run-time version information is now availableКоренберг Марк (дома)2012-08-303-2/+48
| | | | | | | | | | | | | | | | | | | Run-time version information is available as exported four integers: - const int nl_ver_num = LIBNL_VER_NUM; - const int nl_ver_maj = LIBNL_VER_MAJ; - const int nl_ver_min = LIBNL_VER_MIN; - const int nl_ver_mic = LIBNL_VER_MIC; The purpose of this is to get version of compiled library as run time. Use cases: - To know exact version of the library in Python's ctypes module, Say, to find out if nl_cache_mngr_alloc() allow sk=NULL - To make sure that the version of the loaded library corresponds to the version of headers (for the paranoid). Say, to check: if (LIBNL_VER_NUM != nl_ver_num) exit(1);
* Added lex.yy.c to .gitignoreКоренберг Марк (дома)2012-08-301-0/+1
|
* single nexthop flags bugJustin Mayfield2012-08-291-1/+7
| | | | | | | | | | | | | | | | I ran into a bug today related to how Linux handles a route's nexthop flags when there is just one nexthop. Namely Linux expects the flags to be OR'd into the rtm_flags field when there is only one nexthop and so rtnl_route_build_msg needs to check the number of nexthops and store the nexthops flags into this field prior to calling nlmsg_append(...&rtmsg). Conversely the rtnl_route_parse function needs to pull these lower 0xff bits when a single nexthop is detected. Attached is my patch. I don't like the slight duplication of doing the rtnl_route_get_nnexthops check twice but it seemed to be the least turmoil of any solution I thought of.
* nl_addr_parse handling of 'default', 'any', and 'all'Justin Mayfield2012-08-291-4/+3
| | | | | | | | | | | | I found a small bug in the nl_addr_parse function when being passed the strings "default", "any", or "all". Currently nl_addr_parse will create a zeroed nl_addr with a length corresponding to the family/hint or AF_INET if omitted. This behavior when used in conjunction with the libnl-route library to add default routes to the system has the side effect of creating a route to the host address 0.0.0.0/32. Attached is a patch that matches the iproute2 behavior more closely where we do set the family but the length of the nl_addr is set to 0.
* route_clone : fix segmentation fault using nl_cache_subset to filter routesLoïc Touraine2012-08-291-0/+3
| | | | | reset the nb nhops to 0 (dst->rt_nr_nh = 0) before setting the dst->nhops from the src->nhops
* Fix build warning after const char ** convertThomas Graf2012-08-292-4/+4
| | | | | | | | | | Commit 25d640da4a caused the following build warning: ../include/netlink/utils.h:47:15: note: expected 'const char **' but argument is of type 'char **' route/link/inet6.c:300:11: warning: passing argument 2 of 'nl_cancel_down_bytes' from incompatible pointer type [enabled by default] Revert the const char ** change. Signed-off-by: Thomas Graf <tgraf@suug.ch>
* Fix the always false if (a->rt_nr_nh != a->rt_nr_nh) testMichele Baldessari2012-08-291-1/+1
| | | | | Fix the always false if (a->rt_nr_nh != a->rt_nr_nh) test and compare properly the a and b structs
* lib/utils.c: One kilobit now is a 1000bits (instead of 1024)Коренберг Марк2012-08-282-20/+30
| | | | | | | http://en.wikipedia.org/wiki/Kilobit Also, convert "char*" to "const char*" in output value, as returned values can not be modified.
* ct_dump_stats: detect when stats are not availableКоренберг Марк (дома)2012-08-281-8/+19
| | | | | | | | | | Since about 2.6.27 kernel, stats are not enabled by default. Stats can be enabled using sysctl named net.netfilter.nf_conntrack_acct So, do not print zeroes in stats if it's not available. When not checked, trash may appear in output
* nl_cli_route_parse_table fixed typo in codeКоренберг Марк (дома)2012-08-281-1/+1
| | | | Bug introduced in 2bdcde7e8e8bb78b165f093f1a708134f417e557
* tbf: fix false missing attrStephane Fillod2012-08-091-1/+1
| | | | Fix false missing attribute in tbf_msg_fill() when applying a tbf qdisc.
* libnl 3.2.11libnl3_2_11Thomas Graf2012-06-131-3/+3
|
* Fix types-related warnings based on clang diagnosticsКоренберг Марк2012-06-1318-51/+63
| | | | | | | | | | | | | | | | | 1. Fix some places where unsigned value compared < 0 2. Fix obsolete %Z specifier to more portable %z 3. Some erroneous types substitution 4. nl_msec2str() - 64-bit msec is now properly used, Only safe changes. I mean int <--> uint32_t and signed/unsigned fixes. Some functinos require size_t argument instead of int, but changes of signatures of that functions is terrible thing. Also, I do not pretend for a full list of fixes. Just to shut up clang -Wall -Wextra One more thing. ifindex. I don't change that because changes will be too big for simple fix.
* link: rtnl_link_get_kernel() should only wait for ACK if AUTO-ACK is onThomas Graf2012-06-131-1/+1
| | | | Signed-off-by: Thomas Graf <tgraf@suug.ch>
* genl: cleanup genl_ctrl_resolve()Thomas Graf2012-06-131-7/+13
| | | | Signed-off-by: Thomas Graf <tgraf@suug.ch>
* genl: Wait for ACK after successful ctrl replyThomas Graf2012-06-131-1/+8
| | | | Signed-off-by: Thomas Graf <tgraf@suug.ch>
* Correct missing fwmark mask proto.Andrew Collins2012-06-111-0/+1
| | | | | In my previous patch for adding fwmark mask support, I neglected to add a prototype for it. This change corrects my oversight.
* Add 'ingress' to the list of recognized TC handles.Andrew Collins2012-06-111-0/+5
| | | | | | Currently, rtnl_tc_handle2str understands the ingress handle but rtnl_tc_str2handle does not. This change lets rtnl_tc_str2handle recognize 'ingress' as a valid handle as well.
* Fixed memory leak in Cache destructorКоренберг Марк2012-06-081-1/+1
| | | | destructor of Cache was missing due to typo
* rtnl_link_(get|set)_weight is deprecated in libnl.Коренберг Марк (ноутбук дома)2012-06-082-21/+0
| | | | So, remove from python binding. Should not break compatibility.
* netlink.nlattr re-implemented in more pythonic wayКоренберг Марк2012-06-088-116/+66
|
* nl_pickup removed from python bindingКоренберг Марк2012-06-081-5/+0
|
* Remove unnecessary commentsКоренберг Марк (ноутбук дома)2012-06-086-186/+0
|
* Refine some placesКоренберг Марк (ноутбук дома)2012-06-082-19/+20
| | | | No real logick change
* pylint's first review and trivial fixesКоренберг Марк (ноутбук дома)2012-06-088-91/+105
|
* Using only single quotes now and multi-line listsКоренберг Марк (ноутбук дома)2012-06-087-41/+59
| | | | Nothing algorithmic changed really, just cosmetics
* Fix indentation (spaces vs tabs)Коренберг Марк (ноутбук дома)2012-06-089-2192/+2192
| | | | Now, python files use pseudo-tab equal 4 spaces
* Code cleanupsКоренберг Марк (ноутбук дома)2012-06-082-8/+2
| | | | | | 1. unused "import struct" removed 2. AddressFamily.__len__ is defined, but why in so way? removed. 3. comparison against instancemethod type fixed
* Flags properties description and implementation fixedКоренберг Марк (ноутбук дома)2012-06-083-9/+42
| | | | | | | 1. Address, Link and Vlan classes affected with same bug 2. Flags property are not designed as set class. Setting to property will not replace flags, just add flags to set. So, jist document that, and fixed obvious logick.
* Fixed various str-related logickКоренберг Марк (ноутбук дома)2012-06-085-10/+10
|
* Fix whitespaces at EOLКоренберг Марк (ноутбук дома)2012-06-087-27/+27
| | | | Make git happy with that