]> granicus.if.org Git - libnl/log
libnl
12 years agoAdd configure option to disable pthreads support
Rich Fought [Fri, 26 Oct 2012 19:19:26 +0000 (12:19 -0700)]
Add configure option to disable pthreads support

12 years agoMerge branch 'master' of https://github.com/rmfought/libnl
Thomas Graf [Fri, 26 Oct 2012 10:48:22 +0000 (12:48 +0200)]
Merge branch 'master' of https://github.com/rmfought/libnl

12 years agoadd missing '}' in __cplusplus namespaces
Thomas Graf [Tue, 23 Oct 2012 13:28:24 +0000 (15:28 +0200)]
add missing '}' in __cplusplus namespaces

Signed-off-by: Thomas Graf <tgraf@redhat.com>
12 years agoMerge branch 'fixes' of https://github.com/socketpair/libnl
Thomas Graf [Mon, 22 Oct 2012 10:24:19 +0000 (12:24 +0200)]
Merge branch 'fixes' of https://github.com/socketpair/libnl

12 years agoDon't include doc/ in toplevel dist
Thomas Graf [Mon, 22 Oct 2012 10:09:03 +0000 (12:09 +0200)]
Don't include doc/ in toplevel dist

On a second thought, don't include doc/ in dist at all and distribute it
separately. The doc source files are available in the git tree anyway.

Signed-off-by: Thomas Graf <tgraf@redhat.com>
12 years agoSource cleanup for upstream
Rich Fought [Fri, 19 Oct 2012 18:18:52 +0000 (11:18 -0700)]
Source cleanup for upstream

12 years agonl_recv(): work with credentials only if "creds" given and NL_SOCK_PASSCRED set
Коренберг Марк (дома) [Fri, 19 Oct 2012 17:23:10 +0000 (23:23 +0600)]
nl_recv(): work with credentials only if "creds" given and NL_SOCK_PASSCRED set

12 years agonl_recv(): small code cleanups
Коренберг Марк (дома) [Fri, 19 Oct 2012 17:06:23 +0000 (23:06 +0600)]
nl_recv(): small code cleanups

1. memset around nla is unnecessary
2. calloc() is unnecessary. malloc() used instead.

12 years agonl_recv(): EWOULDBLOCK return value also checked
Коренберг Марк (дома) [Fri, 19 Oct 2012 17:04:23 +0000 (23:04 +0600)]
nl_recv(): EWOULDBLOCK return value also checked

12 years agonl_recv(): Memory allocation errors are handled properly now
Коренберг Марк (дома) [Fri, 19 Oct 2012 16:58:58 +0000 (22:58 +0600)]
nl_recv(): Memory allocation errors are handled properly now

1. all cleanup actions (like free()) now located at the end of function
2. in case of error or EOF, *buf and *creds (if given) set to NULL
   This protect from invalid code at user's side, like:
   char *buf;
   x = nl_recv(..., &buf, ...);
   if (x<=0)
      goto cleanup;
   cleanup:
      free(buf);
3. all intermediate buffers are stored into local variables, and user's
   variables only touches at the end.

12 years agonl_recv(): "else if" logick simplified and refined
Коренберг Марк (ноутбук дома) [Sun, 9 Sep 2012 20:25:07 +0000 (02:25 +0600)]
nl_recv(): "else if" logick simplified and refined

12 years agonf-log example: correct copy-range parsing
Коренберг Марк (дома) [Fri, 21 Sep 2012 17:10:26 +0000 (23:10 +0600)]
nf-log example: correct copy-range parsing

12 years agoClang diagnostics
Коренберг Марк (ноутбук дома) [Sun, 9 Sep 2012 19:33:04 +0000 (01:33 +0600)]
Clang diagnostics

Based on clang diagnostics:

1. lib/nl.c: recvmsgs(): nla filling with zeros commented.
2. lib/route/classid.c: & lib/route/pktloc.c:
   remove zero-filling of struct stat
3. lib/route/qdisc/htb.c: Fix htb_qdisc_msg_fill(): fix zero-filling
4. ematch/container.c: container_parse:
   commented why only 4 bytes are copied
   len marked as unused to eliminate compiler warning

12 years agoROUTE_DIFF result was not used in some place in route_compare
Коренберг Марк (ноутбук дома) [Sun, 9 Sep 2012 19:21:52 +0000 (01:21 +0600)]
ROUTE_DIFF result was not used in some place in route_compare

12 years agogenl/family flags can be damaged during the auto-indentation.
Коренберг Марк (ноутбук дома) [Sun, 9 Sep 2012 16:30:20 +0000 (22:30 +0600)]
genl/family flags can be damaged during the auto-indentation.

"-" was never used in the names of the flags. "_" was used in all places
of the library. So, I just changed the undescore to the minus.

Automatic indentation can insert spaces on either side of the minus,
so the library will be compiled, but will not be usable (in this part of the code),
as the parser will split words by white space, and the flag "admin - perm"
will never work.

12 years ago3.2.14 release libnl3_2_14
Thomas Graf [Fri, 19 Oct 2012 14:35:51 +0000 (16:35 +0200)]
3.2.14 release

12 years agoOnly include doc/ in dist
Thomas Graf [Fri, 19 Oct 2012 14:35:28 +0000 (16:35 +0200)]
Only include doc/ in dist

12 years agodoc: Split doc/ into separate packages
Thomas Graf [Fri, 19 Oct 2012 14:16:06 +0000 (16:16 +0200)]
doc: Split doc/ into separate packages

Separates all the documentation generation trickery to its own
configure.in and allows to easily generate a pre built doc dist
file for distribution.

Arguments to configure will be passed on to doc/configure

Signed-off-by: Thomas Graf <tgraf@redhat.com>
12 years agodoc: mark route.txt as WIP
Thomas Graf [Fri, 19 Oct 2012 13:06:50 +0000 (15:06 +0200)]
doc: mark route.txt as WIP

12 years agoConntrack Dump ICMP
Rich Fought [Thu, 4 Oct 2012 21:55:36 +0000 (21:55 +0000)]
Conntrack Dump ICMP

Looks like a cut and paste oversight ...

12 years agoUpdated nfnetlink includes; removed ifdefs; added delete exp program
Rich Fought [Tue, 16 Oct 2012 19:13:33 +0000 (12:13 -0700)]
Updated nfnetlink includes; removed ifdefs; added delete exp program

12 years agodefine advanced attributes out
Rich Fought [Sat, 13 Oct 2012 00:44:27 +0000 (17:44 -0700)]
define advanced attributes out

12 years agoBugfixes
Rich Fought [Wed, 10 Oct 2012 20:08:23 +0000 (13:08 -0700)]
Bugfixes

12 years agoreinit port numers on tuple dump
Rich Fought [Tue, 9 Oct 2012 22:22:16 +0000 (15:22 -0700)]
reinit port numers on tuple dump

12 years agobugfixes
Rich Fought [Tue, 9 Oct 2012 22:16:00 +0000 (15:16 -0700)]
bugfixes

12 years agolink: Support link grouping
Thomas Graf [Tue, 9 Oct 2012 19:55:31 +0000 (21:55 +0200)]
link: Support link grouping

New functions:
  rtnl_link_set_group(link, group)
  rtnl_link_get_group(link)

The group identifier is printed in the brief section as "group N"

Signed-off-by: Thomas Graf <tgraf@redhat.com>
12 years agodoc: Provide documentation for link promis counter and rx/tx queues
Thomas Graf [Tue, 9 Oct 2012 19:37:31 +0000 (21:37 +0200)]
doc: Provide documentation for link promis counter and rx/tx queues

Signed-off-by: Thomas Graf <tgraf@redhat.com>
12 years agolink: Include IFLA_NUM_TX_QUEUES and IFLA_NUM_RX_QUEUES when building messages
Thomas Graf [Tue, 9 Oct 2012 19:24:35 +0000 (21:24 +0200)]
link: Include IFLA_NUM_TX_QUEUES and IFLA_NUM_RX_QUEUES when building messages

Signed-off-by: Thomas Graf <tgraf@redhat.com>
12 years agolink: Only print "promisc-mode" if users > 0
Thomas Graf [Tue, 9 Oct 2012 17:58:54 +0000 (19:58 +0200)]
link: Only print "promisc-mode" if users > 0

Signed-off-by: Thomas Graf <tgraf@redhat.com>
12 years agolink: Support IFLA_NUM_TX_QUEUES and IFLA_NUM_RX_QUEUES
Thomas Graf [Tue, 9 Oct 2012 17:57:22 +0000 (19:57 +0200)]
link: Support IFLA_NUM_TX_QUEUES and IFLA_NUM_RX_QUEUES

New functions:
  rtnl_link_set_num_tx_queues(link, nqueues)
  rtnl_link_get_num_tx_queues(link)
  rtnl_link_set_num_rx_queues(link, nqueues)
  rtnl_link_get_num_rx_queues(link)

Signed-off-by: Thomas Graf <tgraf@redhat.com>
12 years agoupdate gitignore
Rich Fought [Tue, 9 Oct 2012 17:54:07 +0000 (10:54 -0700)]
update gitignore

12 years agoExpectation get cli tool
Rich Fought [Tue, 9 Oct 2012 17:52:34 +0000 (10:52 -0700)]
Expectation get cli tool

12 years agolink: correctly set LINK_ATTR_PROMISCUITY
Thomas Graf [Tue, 9 Oct 2012 17:34:23 +0000 (19:34 +0200)]
link: correctly set LINK_ATTR_PROMISCUITY

Signed-off-by: Thomas Graf <tgraf@redhat.com>
12 years agoCompile CLI
Rich Fought [Tue, 9 Oct 2012 16:50:31 +0000 (09:50 -0700)]
Compile CLI

12 years agolink: Support IFLA_PROMISCUITY link attribute
Thomas Graf [Tue, 9 Oct 2012 16:15:50 +0000 (18:15 +0200)]
link: Support IFLA_PROMISCUITY link attribute

 * read-only attribute
 * dumped in details sections "promisc-mode (N users)"

Signed-off-by: Thomas Graf <tgraf@redhat.com>
12 years agonl: Provide API to specify the default buffer size when receiving netlink messages
Thomas Graf [Tue, 9 Oct 2012 14:15:08 +0000 (16:15 +0200)]
nl: Provide API to specify the default buffer size when receiving netlink messages

New functions:
  nl_socket_set_msg_buf_size(sk, size)
  nl_socket_get_msg_buf_size(sk)

Default remains getpagesize()

Signed-off-by: Thomas Graf <tgraf@redhat.com>
12 years agoStarting CLI work
Rich Fought [Tue, 9 Oct 2012 00:31:42 +0000 (17:31 -0700)]
Starting CLI work

12 years agoSuccessful compilation of libnl-nf with expectation
Rich Fought [Mon, 8 Oct 2012 23:49:06 +0000 (16:49 -0700)]
Successful compilation of libnl-nf with expectation

12 years agoCheckpoint before compilation attempt
Rich Fought [Mon, 8 Oct 2012 22:26:55 +0000 (15:26 -0700)]
Checkpoint before compilation attempt

12 years ago"checkpoint"
Rich Fought [Sat, 6 Oct 2012 00:32:20 +0000 (17:32 -0700)]
"checkpoint"

12 years agoCheckpoint: compare function
Rich Fought [Fri, 5 Oct 2012 18:09:45 +0000 (11:09 -0700)]
Checkpoint: compare function

12 years agoExp checkpoint
Rich Fought [Fri, 5 Oct 2012 13:55:04 +0000 (06:55 -0700)]
Exp checkpoint

12 years agoEnabled the use of Links as context managers.
Antoni S. Puimedon [Thu, 4 Oct 2012 20:36:55 +0000 (16:36 -0400)]
Enabled the use of Links as context managers.

With this change you can still set do modifications of
Links and then to change to pass the changes to the
kernel. But it additionally enables you to interact
with this part of libnl-python in a more pythonic
way. Instead of:

    eth0 = links['eth0']
    eth0.mtu = 5000
    eth0.change()

you can do:

    with links['eth0'] as eth0:
        eth0.mtu = 5000

12 years ago3.2.13 release libnl3_2_13
Thomas Graf [Mon, 3 Sep 2012 11:41:11 +0000 (13:41 +0200)]
3.2.13 release

12 years agolibnl-3.2.12 - ./configure --disable-doc: error: conditional "LINK_DOC" was never...
Jeroen Roovers [Sun, 2 Sep 2012 13:34:53 +0000 (15:34 +0200)]
libnl-3.2.12 - ./configure --disable-doc: error: conditional "LINK_DOC" was 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

12 years agoMerge branch 'asprintf' of https://github.com/socketpair/libnl
Thomas Graf [Fri, 31 Aug 2012 14:25:47 +0000 (16:25 +0200)]
Merge branch 'asprintf' of https://github.com/socketpair/libnl

12 years agoMerge branch 'doxyfile' of https://github.com/socketpair/libnl
Thomas Graf [Fri, 31 Aug 2012 14:23:39 +0000 (16:23 +0200)]
Merge branch 'doxyfile' of https://github.com/socketpair/libnl

12 years agodoc: Update Doxyfile.in to latest syntax
Thomas Graf [Fri, 31 Aug 2012 14:23:07 +0000 (16:23 +0200)]
doc: Update Doxyfile.in to latest syntax

12 years agogenl_ctrl_probe_by_name: fix checking of genlmsg_put() return value
Коренберг Марк [Thu, 30 Aug 2012 16:53:19 +0000 (22:53 +0600)]
genl_ctrl_probe_by_name: fix checking of genlmsg_put() return value

It's a pointer! not an error code :) nasty bugs

12 years agoRemove auto-generated Doxyfile from git
Коренберг Марк [Thu, 30 Aug 2012 16:43:09 +0000 (22:43 +0600)]
Remove auto-generated Doxyfile from git

Also, add it to gitignore

12 years agoasprintf related fixed in yy parser
Коренберг Марк [Thu, 30 Aug 2012 16:25:21 +0000 (22:25 +0600)]
asprintf related fixed in yy parser

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

12 years agoAddress comparison bug fixed
Коренберг Марк [Thu, 30 Aug 2012 14:59:38 +0000 (20:59 +0600)]
Address comparison bug fixed

Bug introduced in 794ac78c5618ee81a45e4f58694ee27b3403ebd7

12 years agoMore clean NL_AUTO_PORT and NL_AUTO_SEQ usage in nl_complete_msg
Коренберг Марк [Thu, 30 Aug 2012 12:40:11 +0000 (18:40 +0600)]
More clean NL_AUTO_PORT and NL_AUTO_SEQ usage in nl_complete_msg

12 years ago3.2.12 release libnl3_2_12
Thomas Graf [Thu, 30 Aug 2012 11:46:29 +0000 (13:46 +0200)]
3.2.12 release

12 years agoconfigure: Check for pygmentize when building docs
Thomas Graf [Thu, 30 Aug 2012 11:36:23 +0000 (13:36 +0200)]
configure: Check for pygmentize when building docs

Signed-off-by: Thomas Graf <tgraf@suug.ch>
12 years agodoc: Update Doxyfile config to latest release
Thomas Graf [Thu, 30 Aug 2012 11:22:21 +0000 (13:22 +0200)]
doc: Update Doxyfile config to latest release

12 years agoroute: Document ROUTE_CACHE_CONTENT flag
Thomas Graf [Thu, 30 Aug 2012 11:19:56 +0000 (13:19 +0200)]
route: Document ROUTE_CACHE_CONTENT flag

Signed-off-by: Thomas Graf <tgraf@suug.ch>
12 years agoconfigure: Check for graphviz and source-highlight before building documentation
Thomas Graf [Thu, 30 Aug 2012 11:15:45 +0000 (13:15 +0200)]
configure: Check for graphviz and source-highlight before building documentation

Signed-off-by: Thomas Graf <tgraf@suug.ch>
12 years agoPrevent potential socket file descriptor leak
Коренберг Марк (дома) [Wed, 29 Aug 2012 22:33:40 +0000 (04:33 +0600)]
Prevent potential socket file descriptor leak

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.

12 years agoFix warning "not checking return value of fscanf" in lib/utils.c: get_psched_settings
Коренберг Марк (дома) [Wed, 29 Aug 2012 18:47:09 +0000 (00:47 +0600)]
Fix warning "not checking return value of fscanf" in lib/utils.c: 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.

12 years agoFix typo in textual description in ct_dump_stats()
Коренберг Марк (дома) [Wed, 29 Aug 2012 18:15:12 +0000 (00:15 +0600)]
Fix typo in textual description in ct_dump_stats()

Bug introduced in a0f1c0e281ee78ab8ee874bbb6c2140c12101284

12 years ago"%llu" replaced with "%" PRIu64
Коренберг Марк (дома) [Wed, 29 Aug 2012 17:59:17 +0000 (23:59 +0600)]
"%llu" replaced with "%" PRIu64

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.

12 years agoRun-time version information is now available
Коренберг Марк (дома) [Wed, 29 Aug 2012 16:55:14 +0000 (22:55 +0600)]
Run-time version information is now available

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);

12 years agoAdded lex.yy.c to .gitignore
Коренберг Марк (дома) [Wed, 29 Aug 2012 16:38:46 +0000 (22:38 +0600)]
Added lex.yy.c to .gitignore

12 years agosingle nexthop flags bug
Justin Mayfield [Fri, 17 Aug 2012 01:03:48 +0000 (19:03 -0600)]
single nexthop flags bug

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.

12 years agonl_addr_parse handling of 'default', 'any', and 'all'
Justin Mayfield [Sat, 18 Aug 2012 00:16:44 +0000 (18:16 -0600)]
nl_addr_parse handling of 'default', 'any', and 'all'

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.

12 years agoroute_clone : fix segmentation fault using nl_cache_subset to filter routes
Loïc Touraine [Wed, 29 Aug 2012 10:14:01 +0000 (12:14 +0200)]
route_clone : fix segmentation fault using nl_cache_subset to filter routes

reset the nb nhops to 0 (dst->rt_nr_nh = 0) before setting the dst->nhops
from the src->nhops

12 years agoFix build warning after const char ** convert
Thomas Graf [Wed, 29 Aug 2012 10:05:51 +0000 (12:05 +0200)]
Fix build warning after const char ** convert

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>
12 years agoFix the always false if (a->rt_nr_nh != a->rt_nr_nh) test
Michele Baldessari [Tue, 28 Aug 2012 18:28:28 +0000 (20:28 +0200)]
Fix the always false if (a->rt_nr_nh != a->rt_nr_nh) test

Fix the always false if (a->rt_nr_nh != a->rt_nr_nh) test and compare
properly the a and b structs

12 years agolib/utils.c: One kilobit now is a 1000bits (instead of 1024)
Коренберг Марк [Tue, 28 Aug 2012 12:39:14 +0000 (18:39 +0600)]
lib/utils.c: One kilobit now is a 1000bits (instead of 1024)

http://en.wikipedia.org/wiki/Kilobit

Also, convert "char*" to "const char*" in output value,
as returned values can not be modified.

12 years agoct_dump_stats: detect when stats are not available
Коренберг Марк (дома) [Mon, 27 Aug 2012 17:39:29 +0000 (23:39 +0600)]
ct_dump_stats: detect when stats are not available

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

12 years agonl_cli_route_parse_table fixed typo in code
Коренберг Марк (дома) [Mon, 27 Aug 2012 17:14:07 +0000 (23:14 +0600)]
nl_cli_route_parse_table fixed typo in code

Bug introduced in 2bdcde7e8e8bb78b165f093f1a708134f417e557

12 years agotbf: fix false missing attr
Stephane Fillod [Wed, 1 Aug 2012 20:29:47 +0000 (22:29 +0200)]
tbf: fix false missing attr

Fix false missing attribute in tbf_msg_fill() when applying a tbf qdisc.

12 years agolibnl 3.2.11 libnl3_2_11
Thomas Graf [Wed, 13 Jun 2012 11:49:52 +0000 (13:49 +0200)]
libnl 3.2.11

12 years agoFix types-related warnings based on clang diagnostics
Коренберг Марк [Fri, 8 Jun 2012 14:15:06 +0000 (20:15 +0600)]
Fix types-related warnings based on clang diagnostics

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.

12 years agolink: rtnl_link_get_kernel() should only wait for ACK if AUTO-ACK is on
Thomas Graf [Wed, 13 Jun 2012 11:24:19 +0000 (13:24 +0200)]
link: rtnl_link_get_kernel() should only wait for ACK if AUTO-ACK is on

Signed-off-by: Thomas Graf <tgraf@suug.ch>
12 years agogenl: cleanup genl_ctrl_resolve()
Thomas Graf [Wed, 13 Jun 2012 11:23:04 +0000 (13:23 +0200)]
genl: cleanup genl_ctrl_resolve()

Signed-off-by: Thomas Graf <tgraf@suug.ch>
12 years agogenl: Wait for ACK after successful ctrl reply
Thomas Graf [Wed, 13 Jun 2012 11:04:03 +0000 (13:04 +0200)]
genl: Wait for ACK after successful ctrl reply

Signed-off-by: Thomas Graf <tgraf@suug.ch>
12 years agoCorrect missing fwmark mask proto.
Andrew Collins [Mon, 11 Jun 2012 16:44:43 +0000 (10:44 -0600)]
Correct missing fwmark mask proto.

In my previous patch for adding fwmark mask support, I neglected
to add a prototype for it.  This change corrects my oversight.

12 years agoAdd 'ingress' to the list of recognized TC handles.
Andrew Collins [Mon, 11 Jun 2012 16:44:42 +0000 (10:44 -0600)]
Add 'ingress' to the list of recognized TC handles.

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.

12 years agoFixed memory leak in Cache destructor
Коренберг Марк [Fri, 8 Jun 2012 07:19:27 +0000 (13:19 +0600)]
Fixed memory leak in Cache destructor

destructor of Cache was missing due to typo

12 years agortnl_link_(get|set)_weight is deprecated in libnl.
Коренберг Марк (ноутбук дома) [Thu, 7 Jun 2012 20:59:03 +0000 (02:59 +0600)]
rtnl_link_(get|set)_weight is deprecated in libnl.

So, remove from python binding. Should not break compatibility.

12 years agonetlink.nlattr re-implemented in more pythonic way
Коренберг Марк [Thu, 7 Jun 2012 07:48:06 +0000 (13:48 +0600)]
netlink.nlattr re-implemented in more pythonic way

12 years agonl_pickup removed from python binding
Коренберг Марк [Thu, 7 Jun 2012 09:15:50 +0000 (15:15 +0600)]
nl_pickup removed from python binding

12 years agoRemove unnecessary comments
Коренберг Марк (ноутбук дома) [Tue, 5 Jun 2012 19:56:58 +0000 (01:56 +0600)]
Remove unnecessary comments

12 years agoRefine some places
Коренберг Марк (ноутбук дома) [Tue, 5 Jun 2012 17:02:10 +0000 (23:02 +0600)]
Refine some places

No real logick change

12 years agopylint's first review and trivial fixes
Коренберг Марк (ноутбук дома) [Tue, 5 Jun 2012 19:36:05 +0000 (01:36 +0600)]
pylint's first review and trivial fixes

12 years agoUsing only single quotes now and multi-line lists
Коренберг Марк (ноутбук дома) [Tue, 5 Jun 2012 17:01:39 +0000 (23:01 +0600)]
Using only single quotes now and multi-line lists

Nothing algorithmic changed really, just cosmetics

12 years agoFix indentation (spaces vs tabs)
Коренберг Марк (ноутбук дома) [Mon, 4 Jun 2012 19:08:27 +0000 (01:08 +0600)]
Fix indentation (spaces vs tabs)

Now, python files use pseudo-tab equal 4 spaces

12 years agoCode cleanups
Коренберг Марк (ноутбук дома) [Mon, 4 Jun 2012 17:20:24 +0000 (23:20 +0600)]
Code cleanups

1. unused "import struct" removed
2. AddressFamily.__len__ is defined, but why in so way? removed.
3. comparison against instancemethod type fixed

12 years agoFlags properties description and implementation fixed
Коренберг Марк (ноутбук дома) [Mon, 4 Jun 2012 17:39:30 +0000 (23:39 +0600)]
Flags properties description and implementation fixed

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.

12 years agoFixed various str-related logick
Коренберг Марк (ноутбук дома) [Mon, 4 Jun 2012 17:12:26 +0000 (23:12 +0600)]
Fixed various str-related logick

12 years agoFix whitespaces at EOL
Коренберг Марк (ноутбук дома) [Mon, 4 Jun 2012 16:55:49 +0000 (22:55 +0600)]
Fix whitespaces at EOL

Make git happy with that

12 years agoIntroduce Python's absolute_imports
Коренберг Марк (ноутбук дома) [Mon, 4 Jun 2012 16:54:16 +0000 (22:54 +0600)]
Introduce Python's absolute_imports

Helps greatly when porting to Python 3

12 years agoFix typo in still unused function that generate colored message
Коренберг Марк (ноутбук дома) [Mon, 4 Jun 2012 16:52:02 +0000 (22:52 +0600)]
Fix typo in still unused function that generate colored message

12 years agoMake syntax highlighters happy
Коренберг Марк (ноутбук дома) [Mon, 4 Jun 2012 16:50:36 +0000 (22:50 +0600)]
Make syntax highlighters happy

Fix typo in docstring

12 years agoRemoved generated .pyc files from repository
Коренберг Марк [Fri, 8 Jun 2012 05:52:50 +0000 (11:52 +0600)]
Removed generated .pyc files from repository

12 years agoFixed address deletion
Коренберг Марк (ноутбук дома) [Mon, 4 Jun 2012 16:49:04 +0000 (22:49 +0600)]
Fixed address deletion

1. rtnl_addr_delete require three arguments
2. comment fixed (fixed copy-past from link.py)

12 years agonetem: Use ARRAY_SIZE()
Thomas Graf [Fri, 8 Jun 2012 13:21:51 +0000 (15:21 +0200)]
netem: Use ARRAY_SIZE()

12 years agortnl_netem_set_delay_distribution: fix possible segfault
Коренберг Марк (ноутбук дома) [Thu, 7 Jun 2012 18:58:14 +0000 (00:58 +0600)]
rtnl_netem_set_delay_distribution: fix possible segfault

fix counting of elements in array. Just typo, as I think.