]> granicus.if.org Git - libnl/log
libnl
10 years agolink/sit: Include <netlink/route/link/sit.h>
Thomas Graf [Sat, 26 Jul 2014 19:33:30 +0000 (21:33 +0200)]
link/sit: Include <netlink/route/link/sit.h>

Signed-off-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: Thomas Haller <thaller@redhat.com>
10 years agolink/ip6tnl: Include <netlink/route/link/ip6tnl.h>
Thomas Graf [Sat, 26 Jul 2014 19:33:31 +0000 (21:33 +0200)]
link/ip6tnl: Include <netlink/route/link/ip6tnl.h>

Signed-off-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: Thomas Haller <thaller@redhat.com>
10 years agolink/ip6tnl: Declare rtnl_link_is_ip6_tnl()
Thomas Graf [Sat, 26 Jul 2014 19:33:32 +0000 (21:33 +0200)]
link/ip6tnl: Declare rtnl_link_is_ip6_tnl()

Signed-off-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: Thomas Haller <thaller@redhat.com>
10 years agohtb: Declare rtnl_htb_set_level()
Thomas Graf [Sat, 26 Jul 2014 19:33:33 +0000 (21:33 +0200)]
htb: Declare rtnl_htb_set_level()

Signed-off-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: Thomas Haller <thaller@redhat.com>
10 years agolink/inet: fix rtnl_link_inet_get_conf() not to allocate inet_data
Thomas Haller [Fri, 25 Jul 2014 22:26:49 +0000 (00:26 +0200)]
link/inet: fix rtnl_link_inet_get_conf() not to allocate inet_data

Instead of allocating a 'struct inet_data', rtnl_link_inet_get_conf()
should only look for an existing entry.

Acked-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: Thomas Haller <thaller@redhat.com>
10 years agostyle: add .indent.pro file for GNU indent
Thomas Haller [Sat, 26 Jul 2014 13:07:00 +0000 (15:07 +0200)]
style: add .indent.pro file for GNU indent

This is somewhat an approximation of the coding style
in libnl3. In the end, it does not work overly well,
but I think it will be useful to cherry-pick some automatic
style fixes.

Acked-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: Thomas Haller <thaller@redhat.com>
10 years agostyle: require comma after __ADD() macro
Thomas Haller [Sat, 26 Jul 2014 13:06:59 +0000 (15:06 +0200)]
style: require comma after __ADD() macro

  $ sed -i 's/^\([\t ]\+\<__ADD\> \?([^)]\+)\) *$/\1,/' `git grep -w -l __ADD`

Acked-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: Thomas Haller <thaller@redhat.com>
10 years agoveth: add kernel header linux/veth.h for VETH defines
Dan Williams [Fri, 25 Jul 2014 19:27:09 +0000 (14:27 -0500)]
veth: add kernel header linux/veth.h for VETH defines

Similar to what's done with <linux/if_link.h>, make sure used defines
actually exist.  Otherwise building on even slightly older kernels
fails.

Taken from upstream kernel commit 1860e379875dfe7271c649058aeddffe5afd9d0d
(tag: v3.15), file 'include/uapi/linux/veth.h'.

Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: Thomas Haller <thaller@redhat.com>
10 years agolink: add ifb device support
Cong Wang [Mon, 21 Jul 2014 19:27:32 +0000 (12:27 -0700)]
link: add ifb device support

Cc: Thomas Graf <tgraf@suug.ch>
Cc: Thomas Haller <thaller@redhat.com>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Acked-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: Thomas Haller <thaller@redhat.com>
10 years agoxfrm: use the right specifier for uint64_t
Cong Wang [Mon, 21 Jul 2014 17:44:45 +0000 (10:44 -0700)]
xfrm: use the right specifier for uint64_t

This fixes compile warnings like this:

xfrm/sp.c: In function 'xfrm_sp_dump_line':
xfrm/sp.c:346:3: warning: format '%llu' expects argument of type 'long long unsigned int', but argument 3 has type 'uint64_t' [-Wformat=]
   sprintf (dir, "%llu", sp->lft->soft_byte_limit);

Cc: Thomas Haller <thaller@redhat.com>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: Thomas Haller <thaller@redhat.com>
10 years agoMerge branch 'xfrm'
Thomas Haller [Sun, 20 Jul 2014 16:23:34 +0000 (18:23 +0200)]
Merge branch 'xfrm'

http://lists.infradead.org/pipermail/libnl/2014-June/001503.html

Signed-off-by: Thomas Haller <thaller@redhat.com>
10 years agoxfrm: style-fixes
Thomas Haller [Sun, 20 Jul 2014 14:11:43 +0000 (16:11 +0200)]
xfrm: style-fixes

Signed-off-by: Thomas Haller <thaller@redhat.com>
10 years agoxfrm: add xfrm support
Sruthi Yellamraju [Sun, 20 Jul 2014 13:57:33 +0000 (15:57 +0200)]
xfrm: add xfrm support

Signed-off-by: Sruthi Yellamraju <ysruthi@gmail.com>
Signed-off-by: Thomas Haller <thaller@redhat.com>
10 years agolibnl-3.2.25 release libnl3_2_25
Thomas Haller [Wed, 16 Jul 2014 09:19:12 +0000 (11:19 +0200)]
libnl-3.2.25 release

Signed-off-by: Thomas Haller <thaller@redhat.com>
10 years agotc: add co_groups for tc qdisc and filter
Cong Wang [Sat, 12 Jul 2014 00:19:03 +0000 (17:19 -0700)]
tc: add co_groups for tc qdisc and filter

Otherwise these tc caches would not be able to be updated
asynchronously.

Cc: Thomas Haller <thaller@redhat.com>
Cc: Thomas Graf <tgraf@suug.ch>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Acked-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: Thomas Haller <thaller@redhat.com>
10 years agobuild: embed the git commit id of HEAD in the configure script
Thomas Haller [Fri, 4 Jul 2014 17:58:04 +0000 (19:58 +0200)]
build: embed the git commit id of HEAD in the configure script

Acked-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: Thomas Haller <thaller@redhat.com>
10 years agobuild: let autogen.sh script change into top source directory
Thomas Haller [Fri, 4 Jul 2014 17:58:03 +0000 (19:58 +0200)]
build: let autogen.sh script change into top source directory

Acked-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: Thomas Haller <thaller@redhat.com>
10 years agoip6tnl: Use <netinet/in.h> for in6_addr and stuff
Thomas Graf [Sat, 28 Jun 2014 07:50:32 +0000 (08:50 +0100)]
ip6tnl: Use <netinet/in.h> for in6_addr and stuff

<linux/in6.h> is not compatible with some versions of <netinet/in.h>.

Cc: Susant Sahani <susant@redhat.com>
Cc: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: Thomas Haller <thaller@redhat.com>
10 years agodoc: state in documentation that libnl3 is supposed to work with 3.x kernels
Thomas Haller [Fri, 27 Jun 2014 17:41:18 +0000 (19:41 +0200)]
doc: state in documentation that libnl3 is supposed to work with 3.x kernels

Signed-off-by: Thomas Haller <thaller@redhat.com>
10 years agolibnl-3.2.25-rc1 release libnl3_2_25rc1
Thomas Haller [Wed, 25 Jun 2014 10:57:13 +0000 (12:57 +0200)]
libnl-3.2.25-rc1 release

Signed-off-by: Thomas Haller <thaller@redhat.com>
10 years agoattr: nla_get_u64() should return 0 if the attribute does not fully contain 64 bit
Thomas Haller [Wed, 25 Jun 2014 08:11:56 +0000 (10:11 +0200)]
attr: nla_get_u64() should return 0 if the attribute does not fully contain 64 bit

Manually "inline" nla_memcpy() to nla_get_u64() and change the behavior
to return always zero (0) if the attribute does not contain at least
sizeof(uint64_t) bytes. Considering endianness, reading a truncated integer
does not seem to be useful and should result in a defined behavior
instead.

Acked-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: Thomas Haller <thaller@redhat.com>
10 years agodoc: fix doxygen-link.py by skipping invalid entries in libnl.dict
Thomas Haller [Wed, 25 Jun 2014 09:45:16 +0000 (11:45 +0200)]
doc: fix doxygen-link.py by skipping invalid entries in libnl.dict

Newer versions of doxygen (on Fedora20) treat the documentation
slightly different so that the following entires end up in
libnl.dict:

    \=api/group__attr.html#ga769cc7bd882aab17c3740dd83329d7e6
    »·······»·······NLA_PUT=api/group__attr.html#ga769cc7bd882aab17c3740dd83329d7e6
    NLA_PUT=api/group__attr.html#ga769cc7bd882aab17c3740dd83329d7e6

Especially, replacing r'\' breaks the generated html documentation.
Extend doxygen-link.py to strip whitespaces from the name and
skip over r'\'.

Also, when replacing the words in the output file, match them
using word boundaries r'\b'.

Also, don't print an additional newline after each processed line.

Acked-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: Thomas Haller <thaller@redhat.com>
10 years agocache: add missing declaration of nl_cache_move() in include/netlink/cache.h
Sruthi Yellamraju [Tue, 24 Jun 2014 19:03:15 +0000 (15:03 -0400)]
cache: add missing declaration of nl_cache_move() in include/netlink/cache.h

Signed-off-by: Sruthi Yellamraju <ysruthi@gmail.com>
[thaller@redhat.com: modified tab vs. whitespace]
Signed-off-by: Thomas Haller <thaller@redhat.com>
10 years agoMerge branch 'coverity-fixes-2'
Thomas Haller [Wed, 25 Jun 2014 07:26:49 +0000 (09:26 +0200)]
Merge branch 'coverity-fixes-2'

http://lists.infradead.org/pipermail/libnl/2014-June/001507.html

Signed-off-by: Thomas Haller <thaller@redhat.com>
10 years agoattr: fix compile warning in headers
Peter Wu [Tue, 24 Jun 2014 21:13:38 +0000 (23:13 +0200)]
attr: fix compile warning in headers

strlen() returns a size_t type, but nla_put accepts an int only. This
breaks a -Werror build of applications using libnl, so avoid this
warning by explicitly casting the length to an int.

Signed-off-by: Peter Wu <peter@lekensteyn.nl>
Signed-off-by: Thomas Haller <thaller@redhat.com>
10 years agoattr: prevent garbage return value for NULL param
Peter Wu [Tue, 24 Jun 2014 21:13:37 +0000 (23:13 +0200)]
attr: prevent garbage return value for NULL param

If nla is not given, then tmp is not set. Explicitly initalize with 0
to prevent garbage values. Found by Clang static analyzer.

Signed-off-by: Peter Wu <peter@lekensteyn.nl>
Signed-off-by: Thomas Haller <thaller@redhat.com>
10 years agou32: prevent memcpy from NULL
Peter Wu [Tue, 24 Jun 2014 21:13:36 +0000 (23:13 +0200)]
u32: prevent memcpy from NULL

Found by Clang static analyzer.

Fixes: 6cdc32df831a273007af7d24a3f75cd06e0ae738
Signed-off-by: Peter Wu <peter@lekensteyn.nl>
Signed-off-by: Thomas Haller <thaller@redhat.com>
10 years agodoc: fix error in core documentation for nl_cache_mngr_alloc()
Thomas Haller [Tue, 17 Jun 2014 16:42:48 +0000 (18:42 +0200)]
doc: fix error in core documentation for nl_cache_mngr_alloc()

Signed-off-by: Thomas Haller <thaller@redhat.com>
10 years agocache_mngr: Fix assignment of error code in nl_cache_mngr_alloc()
Tobias Klauser [Tue, 17 Jun 2014 12:58:10 +0000 (14:58 +0200)]
cache_mngr: Fix assignment of error code in nl_cache_mngr_alloc()

In the current form, the parentheses in these two if (...) statements
lead to err being assigned the result of nl_connect(...) < 0 and
nl_socket_set_nonblocking(...) < 0 instead of the return value of these
functions. Adjust the parentheses to assign the returned error code to
err.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: Thomas Haller <thaller@redhat.com>
10 years agocache_mngr: Return proper error code if nl_socket_alloc() fails
Tobias Klauser [Tue, 17 Jun 2014 12:58:09 +0000 (14:58 +0200)]
cache_mngr: Return proper error code if nl_socket_alloc() fails

If nl_socket_alloc() failes in nl_cache_mngr_alloc() we would currently
return 0 due to the previous assignment of the err variable, even though
the failed allocation is an error condition. Fix this by setting err to
-NLE_NOMEM if nl_socket_alloc() fails.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: Thomas Haller <thaller@redhat.com>
10 years agocli: Fix typo in error message
Tobias Klauser [Tue, 17 Jun 2014 12:48:24 +0000 (14:48 +0200)]
cli: Fix typo in error message

s/neighbout/neighbour/

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: Thomas Haller <thaller@redhat.com>
10 years agobuild: fix error in include/Makefile.am
Thomas Haller [Mon, 16 Jun 2014 15:45:11 +0000 (17:45 +0200)]
build: fix error in include/Makefile.am

Just introduced by me, as an oversight from commit
11f9cc0914aef697c1f49bca7353117cb65fd318.

Signed-off-by: Thomas Haller <thaller@redhat.com>
10 years agoip6tnl: introduce ip6 tunnel support
Susant Sahani [Sat, 10 May 2014 04:48:12 +0000 (10:18 +0530)]
ip6tnl: introduce ip6 tunnel support

This patch adds support for ip6 tunnel that works with
the ip6_tunnel kernel module.

Signed-off-by: Susant Sahani <susant@redhat.com>
Signed-off-by: Thomas Haller <thaller@redhat.com>
10 years agoMerge branch 'coverity-fixes'
Thomas Haller [Tue, 10 Jun 2014 19:46:49 +0000 (21:46 +0200)]
Merge branch 'coverity-fixes'

http://lists.infradead.org/pipermail/libnl/2014-June/001475.html

Signed-off-by: Thomas Haller <thaller@redhat.com>
10 years agoroute/pktloc: read_pktlocs() always returned success status
Thomas Haller [Tue, 10 Jun 2014 16:15:52 +0000 (18:15 +0200)]
route/pktloc: read_pktlocs() always returned success status

Error found by coverity.

Acked-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: Thomas Haller <thaller@redhat.com>
10 years agonetfilter/ct: fix calling nfnl_*_put() on uninitialized memory after nfnlmsg_*_parse()
Thomas Haller [Tue, 10 Jun 2014 16:06:37 +0000 (18:06 +0200)]
netfilter/ct: fix calling nfnl_*_put() on uninitialized memory after nfnlmsg_*_parse()

nfnlmsg_*_parse() does not assign *result on error. So this will
lead to freeing a dangling pointer.

Error found by coverity.

Acked-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: Thomas Haller <thaller@redhat.com>
10 years agoroute/link: fix dangling pointer after rtnl_link_get_ifalias(link, NULL)
Thomas Haller [Tue, 10 Jun 2014 15:50:09 +0000 (17:50 +0200)]
route/link: fix dangling pointer after rtnl_link_get_ifalias(link, NULL)

Fixed bug that left a dangling pointer after clearing the ifalias
property. This happened when calling 'rtnl_link_get_ifalias(link, NULL)'
on a link that has already an ifalias set.

This can cause a crash and/or a double-free.

Error found by coverity.

Acked-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: Thomas Haller <thaller@redhat.com>
10 years agocache: fix crash in nl_cache_dump_filter() when omitting the params argument
Thomas Haller [Tue, 10 Jun 2014 15:42:31 +0000 (17:42 +0200)]
cache: fix crash in nl_cache_dump_filter() when omitting the params argument

Error found by coverity.

Acked-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: Thomas Haller <thaller@redhat.com>
10 years agocls: fix array overrun in rtnl_ematch_opnd2txt()
Thomas Haller [Tue, 10 Jun 2014 13:29:11 +0000 (15:29 +0200)]
cls: fix array overrun in rtnl_ematch_opnd2txt()

Error found by coverity.

Acked-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: Thomas Haller <thaller@redhat.com>
10 years agocli: add error checking to nl-route-get about out-of-memory
Thomas Haller [Tue, 10 Jun 2014 13:54:45 +0000 (15:54 +0200)]
cli: add error checking to nl-route-get about out-of-memory

This is mainly to appease coverity which warned about this.

Acked-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: Thomas Haller <thaller@redhat.com>
10 years agoroute: remove unnecessary non-null check in pktloc and ematch
Thomas Haller [Tue, 10 Jun 2014 14:15:02 +0000 (16:15 +0200)]
route: remove unnecessary non-null check in pktloc and ematch

This check is not necessary, and also they cause coverity to
complain.

Acked-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: Thomas Haller <thaller@redhat.com>
10 years agolib: reorder free() after printf("%p") statements
Thomas Haller [Tue, 10 Jun 2014 15:53:37 +0000 (17:53 +0200)]
lib: reorder free() after printf("%p") statements

Previously coverity was complaining about a use-after-free.
This was not a real problem, because the printf statement
does not dereferenciate the pointer. Change it to avoid
the warning.

Acked-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: Thomas Haller <thaller@redhat.com>
10 years agoroute/link: pass proper type to sizeof() for calloc() in vlan_parse()
Thomas Haller [Tue, 10 Jun 2014 16:20:25 +0000 (18:20 +0200)]
route/link: pass proper type to sizeof() for calloc() in vlan_parse()

This fixes the following coverity warning:
  lib/route/link/vlan.c:148:23:warning – Result of 'calloc' is converted to a pointer of type 'struct vlan_map', which is incompatible with sizeof operand type 'struct ifla_vlan_qos_mapping'

This was not a real problem, because the types are effectively
the same.

Acked-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: Thomas Haller <thaller@redhat.com>
10 years agoact: fix the logic of parsing actions
Cong Wang [Tue, 15 Apr 2014 01:39:08 +0000 (18:39 -0700)]
act: fix the logic of parsing actions

It is proved that actions are not always put from 0,
they could be discontinuous.

http://lists.infradead.org/pipermail/libnl/2014-April/001374.html

Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Acked-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: Thomas Haller <thaller@redhat.com>
10 years agomsg: Remove unnecessary call of nlmsg_free on known NULL pointer
Tobias Klauser [Fri, 30 May 2014 14:10:07 +0000 (16:10 +0200)]
msg: Remove unnecessary call of nlmsg_free on known NULL pointer

In nlmsg_convert, if __nlmsg_alloc fails we can return NULL directly
instead of unnecessarily calling nlmsg_free on the NULL pointer.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Acked-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: Thomas Haller <thaller@redhat.com>
10 years agoobj: Fix dereference before NULL check
Tobias Klauser [Tue, 3 Jun 2014 08:47:48 +0000 (10:47 +0200)]
obj: Fix dereference before NULL check

The check for !obj indicates that obj might be NULL, thus move the call
to obj_ops(obj) - which dereferences obj - after the check.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Acked-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: Thomas Haller <thaller@redhat.com>
10 years agoMerge branch 'mgorny-master'
Thomas Haller [Sun, 25 May 2014 19:56:54 +0000 (21:56 +0200)]
Merge branch 'mgorny-master'

https://github.com/thom311/libnl/pull/58

Signed-off-by: Thomas Haller <thaller@redhat.com>
10 years agoUse paths relative to srcdir in setup.py.
Michał Górny [Sun, 25 May 2014 10:51:32 +0000 (12:51 +0200)]
Use paths relative to srcdir in setup.py.

Currently, setup.py is created by configure in builddir while source
files (.py and .i) reside in srcdir. Adjust paths in setup.py
appropriately to make it possible to perform an out-of-source build.

This is far from perfect but it mostly works. Python files are copied
from srcdir, and swig *.i files are read from there. However, swig
output files are created in srcdir rather than builddir, and distutils
copies '..' literally when constructing '.o' paths. As a result,
'../python/foo.i' would end up being compiled to
'build/temp*/../python/foo.i'.

The alternative would be to copy '*.i' files to builddir before
proceeding with the build, either in Makefile or through creating
additional distutils command.

10 years agoExplicitly create output directories for flex/yacc output.
Michał Górny [Sun, 25 May 2014 09:49:19 +0000 (11:49 +0200)]
Explicitly create output directories for flex/yacc output.

When out-of-source build with '--disable-dependency-tracking' is
performed, the 'lib/route' and 'lib/route/cls' directories required for
flex/yacc output do not exist. As a result, the flex/yacc calls fail
with ENOENT.

Create the necessary directories explicitly via $(MKDIR_P)
in the flex/yacc rules to guarantee proper out-of-source and in-source
build.

10 years agovlan: add support for IFLA_VLAN_PROTOCOL
Susant Sahani [Wed, 7 May 2014 10:35:53 +0000 (16:05 +0530)]
vlan: add support for IFLA_VLAN_PROTOCOL

This patch adds support for IFLA_VLAN_PROTOCOL

Signed-off-by: Susant Sahani <susant@redhat.com>
Acked-by: Thomas Graf <tgraf@suug.ch>
[thaller@redhat.com: minor fixes (whitespace, documentation, and a typo)]
Signed-off-by: Thomas Haller <thaller@redhat.com>
10 years agotunnel: add a copy of include/linux/if_tunnel.h
Cong Wang [Wed, 7 May 2014 17:22:50 +0000 (10:22 -0700)]
tunnel: add a copy of include/linux/if_tunnel.h

This should fix the following compile error:

route/link/ipip.c:52: error: ‘IFLA_IPTUN_MAX’ undeclared here (not in a function)
route/link/ipip.c:53: error: ‘IFLA_IPTUN_LINK’ undeclared here (not in a function)
route/link/ipip.c:53: error: array index in initializer not of integer type
route/link/ipip.c:53: error: (near initialization for ‘ipip_policy’)
route/link/ipip.c:53: error: field name not in record or union initializer
route/link/ipip.c:53: error: (near initialization for ‘ipip_policy’)
...

Reported-by: Vinson Lee <vlee@twitter.com>
Cc: Susant Sahani <susant@redhat.com>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Acked-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: Thomas Haller <thaller@redhat.com>
10 years agoMerge branch 'socket_local_port'
Thomas Haller [Tue, 6 May 2014 12:40:17 +0000 (14:40 +0200)]
Merge branch 'socket_local_port'

Signed-off-by: Thomas Haller <thaller@redhat.com>
10 years agolib/socket: randomize the generated local port
Thomas Haller [Wed, 9 Apr 2014 10:08:53 +0000 (12:08 +0200)]
lib/socket: randomize the generated local port

Instead of always trying the same order of ports when
looking for an unused port, randomize the order (naively).

As libnl-1 uses the same function, it is likely that two applications
that are using both libraries generate the same ports. By chosing a
different order how to select the local port, the chances are smaller
for this to happen (however, it cannot avoid it entirely. The user
and/or libnl3 still has to cope with the situation, that somebody
else might already use the port).

Signed-off-by: Thomas Haller <thaller@redhat.com>
10 years agolib/socket: retry generate local port in nl_connect on ADDRINUSE
Thomas Haller [Wed, 9 Apr 2014 10:08:52 +0000 (12:08 +0200)]
lib/socket: retry generate local port in nl_connect on ADDRINUSE

It can easily happen that the generated local netlink port is alrady in
use. In that case bind will fail with ADDRINUSE.

Users of libnl3 could workaround this, by managing the local ports
themselves, but sometimes these users are libraries too and they also
don't know which ports might be used by other components.

This patch changes that nl_socket_alloc() no longer initilizes the local
port id immediately. Instead it will be initialized when the user calls
nl_socket_get_local_port() the first time and thereby shows interest in
the value.

If bind() fails with ADDRINUSE, check if the user ever cared about the
local port, i.e. whether the local port is still unset. If it is still
unset, assume that libnl should choose a suitable port and retry until
an unused port can be found.

Signed-off-by: Thomas Haller <thaller@redhat.com>
10 years agolib/socket: don't fail if no more local ports can be assigned in nl_socket_alloc
Thomas Haller [Wed, 9 Apr 2014 10:08:51 +0000 (12:08 +0200)]
lib/socket: don't fail if no more local ports can be assigned in nl_socket_alloc

By failing inside of nl_socket_alloc(), the user can not even work around
when running out of local ports. This patch changes that if there are no more
local ports, we set the port to UINT32_MAX. This is a consistent behavior
to calling nl_socket_set_local_port(sk, 0).

In general, since nl_socket_set_local_port() does not restict the generated
ports in any way we cannot assume to have a valid port. So the check in
the constructor was harmful and users who ever encountered it (because they
created 1024 libnl3 sockets) could not even work around it.

Acked-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: Thomas Haller <thaller@redhat.com>
10 years agolib/socket: use proper typed constant UINT32_MAX for uint32_t typed port
Thomas Haller [Wed, 9 Apr 2014 10:08:50 +0000 (12:08 +0200)]
lib/socket: use proper typed constant UINT32_MAX for uint32_t typed port

This was a bug on architectures with native int type less then 32 bit.

Acked-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: Thomas Haller <thaller@redhat.com>
10 years agogitignore: ignore test binaries and artifacts in "tests/"
Thomas Haller [Tue, 6 May 2014 10:48:47 +0000 (12:48 +0200)]
gitignore: ignore test binaries and artifacts in "tests/"

Signed-off-by: Thomas Haller <thaller@redhat.com>
10 years agoipvti: introduce vti tunnel support
Susant Sahani [Tue, 6 May 2014 05:41:30 +0000 (11:11 +0530)]
ipvti: introduce vti tunnel support

Signed-off-by: Susant Sahani <susant@redhat.com>
[thaller@redhat.com: some whitespace fixes]
Signed-off-by: Thomas Haller <thaller@redhat.com>
10 years agoipgre: rename new public API to avoid confusion
Susant Sahani [Tue, 6 May 2014 05:41:31 +0000 (11:11 +0530)]
ipgre: rename new public API to avoid confusion

Signed-off-by: Susant Sahani <susant@redhat.com>
Signed-off-by: Thomas Haller <thaller@redhat.com>
10 years agoipgre: fix attribute IPGRE_ATTR_OKEY in ipgre_put_attrs()
Susant Sahani [Tue, 6 May 2014 05:41:31 +0000 (11:11 +0530)]
ipgre: fix attribute IPGRE_ATTR_OKEY in ipgre_put_attrs()

Signed-off-by: Susant Sahani <susant@redhat.com>
Signed-off-by: Thomas Haller <thaller@redhat.com>
10 years agointroduce sit tunnel support
Susant Sahani [Fri, 25 Apr 2014 17:21:23 +0000 (22:51 +0530)]
introduce sit tunnel support

This patch introduces sit tunnel support

Signed-off-by: Susant Sahani <susant@redhat.com>
Acked-by: Thomas Graf <tgraf@suug.ch>
[thaller@redhat.com: change WS to TAB, fix code doc]
Signed-off-by: Thomas Haller <thaller@redhat.com>
10 years agointroduce gre tunnel support
Susant Sahani [Fri, 25 Apr 2014 17:21:22 +0000 (22:51 +0530)]
introduce gre tunnel support

This patch introduces gre tunnel support

Signed-off-by: Susant Sahani <susant@redhat.com>
Acked-by: Thomas Graf <tgraf@suug.ch>
[thaller@redhat.com: change WS to TAB, fix code doc]
Signed-off-by: Thomas Haller <thaller@redhat.com>
10 years agointroduce ipip tunnel support
Susant Sahani [Thu, 24 Apr 2014 17:46:27 +0000 (23:16 +0530)]
introduce ipip tunnel support

This patch introduces ipip tunnel support. This
works with kernel module ipip.

Signed-off-by: Susant Sahani <susant@redhat.com>
Acked-by: Thomas Graf <tgraf@suug.ch>
[thaller@redhat.com: change WS to TAB, fix code doc]
Signed-off-by: Thomas Haller <thaller@redhat.com>
10 years agogitignore: ignore test binaries and artifacts in "tests/"
Thomas Haller [Mon, 5 May 2014 12:18:52 +0000 (14:18 +0200)]
gitignore: ignore test binaries and artifacts in "tests/"

Signed-off-by: Thomas Haller <thaller@redhat.com>
10 years agodoc: fix wrong name in documentation for rtnl_link_bridge_alloc()
Thomas Haller [Thu, 1 May 2014 18:50:26 +0000 (20:50 +0200)]
doc: fix wrong name in documentation for rtnl_link_bridge_alloc()

Signed-off-by: Thomas Haller <thaller@redhat.com>
10 years agoact: fix memory leak in rtnl_act_parse()
Thomas Haller [Wed, 30 Apr 2014 12:29:46 +0000 (14:29 +0200)]
act: fix memory leak in rtnl_act_parse()

Acked-by: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: Thomas Haller <thaller@redhat.com>
10 years agoact: fix a pointer in rtnl_act_msg_parse()
Cong Wang [Sun, 23 Mar 2014 19:02:10 +0000 (12:02 -0700)]
act: fix a pointer in rtnl_act_msg_parse()

Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Acked-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: Thomas Haller <thaller@redhat.com>
10 years agodocs: add code comment to explain the meaning of the fields in rtnl_addr_cacheinfo
Thomas Haller [Thu, 3 Apr 2014 15:47:37 +0000 (17:47 +0200)]
docs: add code comment to explain the meaning of the fields in rtnl_addr_cacheinfo

Signed-off-by: Thomas Haller <thaller@redhat.com>
10 years agogitignore: ignore 'nf-ct-add' (netfilter/ct)
Thomas Haller [Wed, 30 Apr 2014 11:06:50 +0000 (13:06 +0200)]
gitignore: ignore 'nf-ct-add' (netfilter/ct)

Signed-off-by: Thomas Haller <thaller@redhat.com>
10 years agoact: grab a reference when adding an action to a filter
Cong Wang [Thu, 24 Apr 2014 00:28:29 +0000 (17:28 -0700)]
act: grab a reference when adding an action to a filter

When we add an action to a filter, its lifetime becomes
same with the filter. So in case user frees it before
us, we could just grab a reference here.

Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Acked-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: Thomas Haller <thaller@redhat.com>
10 years agoveth: grab a reference for rtnl_link_veth_get_peer()
Cong Wang [Tue, 29 Apr 2014 17:38:30 +0000 (10:38 -0700)]
veth: grab a reference for rtnl_link_veth_get_peer()

So that users could keep a refcount for the peer.
The capability trick is from Thomas Haller.

Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: Thomas Haller <thaller@redhat.com>
10 years agogitignore: ignore patch files
Hangbin Liu [Wed, 16 Apr 2014 02:16:36 +0000 (10:16 +0800)]
gitignore: ignore patch files

Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
Signed-off-by: Thomas Haller <thaller@redhat.com>
10 years agodoc/core: reply message should send from kernel to app
Hangbin Liu [Wed, 16 Apr 2014 02:16:35 +0000 (10:16 +0800)]
doc/core: reply message should send from kernel to app

Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
Signed-off-by: Thomas Haller <thaller@redhat.com>
10 years agogitignore: ignore ctags file
Hangbin Liu [Wed, 16 Apr 2014 02:16:34 +0000 (10:16 +0800)]
gitignore: ignore ctags file

Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
[thaller@redhat.com: change to ignore /tags only on top-level]
Signed-off-by: Thomas Haller <thaller@redhat.com>
10 years agonetfilter/ct: expand CT parameters that can be used in add/delete operations
Rich Fought [Thu, 27 Feb 2014 00:02:13 +0000 (16:02 -0800)]
netfilter/ct: expand CT parameters that can be used in add/delete operations

This expands functionality for manipulating conntracks over netlink by
adding other attributes to nfnl_ct_build_message(). Added a command link
program to add conntracks.

https://github.com/thom311/libnl/pull/55

[thaller@redhat.com: cleaned up whitespace from original patch]
Acked-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: Thomas Haller <thaller@redhat.com>
10 years agopython: fix wrongly passing argument to function in ObjIterator.next()
Hiroaki KAWAI [Wed, 9 Apr 2014 01:09:16 +0000 (10:09 +0900)]
python: fix wrongly passing argument to function in ObjIterator.next()

self.__next__() bound method does not take an extra argument.

https://github.com/thom311/libnl/pull/57

Signed-off-by: Hiroaki KAWAI <kawai@stratosphere.co.jp>
Signed-off-by: Thomas Haller <thaller@redhat.com>
10 years agoadd NLM_F_EXCL to rtnl_link_veth_add()
Cong Wang [Wed, 2 Apr 2014 01:03:33 +0000 (18:03 -0700)]
add NLM_F_EXCL to rtnl_link_veth_add()

rtnl_link_veth_add() is a helper API we provide, it makes sense to
set NLM_F_EXCL for it since it doesn't accept flags as a parameter.

BTW, correct an indention too.

Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Acked-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: Thomas Haller <thaller@redhat.com>
10 years agoveth: use nl_object_clone() to deep copy rtnl_link object
Cong Wang [Wed, 2 Apr 2014 01:03:32 +0000 (18:03 -0700)]
veth: use nl_object_clone() to deep copy rtnl_link object

Currently we use memcpy() to copy the peer rtnl_link for veth device,
this is wrong, we should do deep copy by calling nl_object_clone()
recursively. We should be careful and need to make sure we only call
it once.

Acked-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: Thomas Haller <thaller@redhat.com>
10 years agoveth: implement ->io_free
Cong Wang [Wed, 2 Apr 2014 01:03:31 +0000 (18:03 -0700)]
veth: implement ->io_free

So that veth link can be just put by rtnl_link_put()

Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Acked-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: Thomas Haller <thaller@redhat.com>
10 years agoveth: implement ->io_alloc
Cong Wang [Wed, 2 Apr 2014 01:03:30 +0000 (18:03 -0700)]
veth: implement ->io_alloc

Users don't have to call rtnl_link_veth_alloc(), instead
use generic rtnl_link_set_type().

Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Acked-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: Thomas Haller <thaller@redhat.com>
10 years agolink: call rtnl_link_set_type() in link_msg_parser()
Cong Wang [Wed, 2 Apr 2014 01:03:29 +0000 (18:03 -0700)]
link: call rtnl_link_set_type() in link_msg_parser()

We need to call link-specific ->io_alloc() to alloc
addtional structures.

Acked-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: Thomas Haller <thaller@redhat.com>
10 years agoact: fix policy range check
Cong Wang [Sat, 5 Apr 2014 01:15:16 +0000 (18:15 -0700)]
act: fix policy range check

mirred action should accept all TC_ACT* policy

Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Acked-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: Thomas Haller <thaller@redhat.com>
10 years agoroute/addr: only sent IFA_FLAGS when needed to workaround picky older kernels
Thomas Haller [Thu, 3 Apr 2014 16:09:51 +0000 (18:09 +0200)]
route/addr: only sent IFA_FLAGS when needed to workaround picky older kernels

Older kernels don't accept receiving unknown netlink attributes.
See net/core/rtnetlink.c, rtnetlink_rcv_msg(). This was fixed by kernel
commit 661d2967b3f1b34eeaa7e212e7b9bbe8ee072b59.

As a workaround, only set the additional attributes, when the user
provided flags that makes this necessary and useful.

https://github.com/thom311/libnl/issues/56
https://bugzilla.redhat.com/show_bug.cgi?id=1063885

Based-on-patch-by: Pavel Kankovsky <peak@argo.troja.mff.cuni.cz>
Acked-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: Thomas Haller <thaller@redhat.com>
10 years agolink: Catch missing io_free() implementations
Thomas Graf [Mon, 31 Mar 2014 11:21:06 +0000 (13:21 +0200)]
link: Catch missing io_free() implementations

Signed-off-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: Thomas Haller <thaller@redhat.com>
10 years agoroute: fix off-by-one in rtnl_act_parse()
Cong Wang [Thu, 27 Mar 2014 05:43:16 +0000 (22:43 -0700)]
route: fix off-by-one in rtnl_act_parse()

Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Acked-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: Thomas Haller <thaller@redhat.com>
10 years agoroute: update copy of kernel header 'ip.h'
Thomas Haller [Thu, 20 Mar 2014 18:18:46 +0000 (19:18 +0100)]
route: update copy of kernel header 'ip.h'

Take 'include/uapi/linux/ip.h' from current kernel v3.13
(commit d8ec26d7f8287f5788a494f56e8814210f0e64be).

Also add three new IPV4_DEVCONF_* names.

Acked-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: Thomas Haller <thaller@redhat.com>
10 years agoroute: rename internal copy of kernel header file 'inetdevice.h' to 'ip.h'
Thomas Haller [Thu, 20 Mar 2014 18:18:45 +0000 (19:18 +0100)]
route: rename internal copy of kernel header file 'inetdevice.h' to 'ip.h'

libnl used 'inetdevice.h' for the IPV4_DEVCONF_* names, which the kernel
in the meantime moved to public user space API and are now defined in 'ip.h'.

As a first step, rename the file 'inetdevice.h'.

Acked-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: Thomas Haller <thaller@redhat.com>
10 years agoroute: update kernel header snmp.h and fix inet6_parse_protinfo() after kernel API...
Thomas Haller [Thu, 20 Mar 2014 18:18:44 +0000 (19:18 +0100)]
route: update kernel header snmp.h and fix inet6_parse_protinfo() after kernel API breakage

Take 'include/uapi/linux/snmp.h' from current kernel v3.13
(commit d8ec26d7f8287f5788a494f56e8814210f0e64be).

The header file added new values for IPSTATS_MIB_* and ICMP6_MIB_*, but
more importantly, the kernel broke user space API by reordering enum values in
IPSTATS_MIB_*. Add a workaround when parsing IFLA_PROTINFO trying to
be compatible with both older and newer kernels.

Note that this workaround might fail for some specific kernel versions by
assuming the old enum value mapping, although the kernel version already
contains the API change. In this case rtnl_link_get_stat() mixes up
values.

Acked-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: Thomas Haller <thaller@redhat.com>
10 years agoroute: detect missing cfgid in rtnl_link_inet_get_conf()
Thomas Haller [Thu, 20 Mar 2014 18:18:43 +0000 (19:18 +0100)]
route: detect missing cfgid in rtnl_link_inet_get_conf()

If the netlink message for IFLA_INET_CONF contains less then
IPV4_DEVCONF_MAX entires, the last entries in i_conf are unset.
Modify rtnl_link_inet_get_conf() to return -EINVAL when accessing
an unset cfgid.

Acked-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: Thomas Haller <thaller@redhat.com>
10 years agoroute: don't enforce minlen in inet6_parse_protinfo() (IFLA_PROTINFO) and inet_parse_...
Thomas Haller [Thu, 20 Mar 2014 18:18:42 +0000 (19:18 +0100)]
route: don't enforce minlen in inet6_parse_protinfo() (IFLA_PROTINFO) and inet_parse_af() (IFLA_AF_SPEC)

Older kernel version might have fewer values defined, so they would send
netlink messages that got rejected. Only check that at least one value
got sent.

This is especially grave as libnl uses an internal copy of the
kernel header files. Thus not only it is bound to the installed kernel
headers but to the libnl internal header copies that might easily be out
of sync with the kernel.

This affects IFLA_PROTINFO, inet6_parse_protinfo():
  - tb[IFLA_INET6_CONF], expecting DEVCONF_MAX
  - tb[IFLA_INET6_STATS], expecting __IPSTATS_MIB_MAX
  - tb[IFLA_INET6_ICMP6STATS], expecting __ICMP6_MIB_MAX
and IFLA_AF_SPEC, inet_parse_af():
  - tb[IFLA_INET_CONF], expecting IPV4_DEVCONF_MAX

https://bugzilla.redhat.com/show_bug.cgi?id=1062533

Acked-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: Thomas Haller <thaller@redhat.com>
10 years agou32: add const to rtnl_u32_add_key_in*_addr()
Cong Wang [Thu, 20 Mar 2014 17:24:12 +0000 (10:24 -0700)]
u32: add const to rtnl_u32_add_key_in*_addr()

Cc: Thomas Haller <thaller@redhat.com>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Acked-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: Thomas Haller <thaller@redhat.com>
10 years agolink: document sk == NULL case for rtnl_link_alloc_cache()
Cong Wang [Thu, 20 Mar 2014 17:45:45 +0000 (10:45 -0700)]
link: document sk == NULL case for rtnl_link_alloc_cache()

When sk == NULL, rtnl_link_alloc_cache() returns 0 but the cache
is still empty. We should document this behavior, otherwise it is confusing.

Cc: Thomas Haller <thaller@redhat.com>
Cc: Thomas Graf <tgraf@suug.ch>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: Thomas Haller <thaller@redhat.com>
10 years agoutils: indicate capability NL_CAPABILITY_ROUTE_BUILD_MSG_SET_SCOPE
Thomas Haller [Thu, 13 Mar 2014 12:16:51 +0000 (13:16 +0100)]
utils: indicate capability NL_CAPABILITY_ROUTE_BUILD_MSG_SET_SCOPE

This capability indicates that libnl does no longer overwrites
the route scope in rtnl_route_build_msg(), as fixed by commit
85ec9c7ad80c60f4f619472f2bb9d9595da93b26.

Acked-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: Thomas Haller <thaller@redhat.com>
10 years agoutils: add nl_has_capability() function
Thomas Haller [Thu, 13 Mar 2014 12:16:05 +0000 (13:16 +0100)]
utils: add nl_has_capability() function

Acked-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: Thomas Haller <thaller@redhat.com>
10 years agofill prio and protocol attr bits when parsing cls message
Cong Wang [Wed, 12 Mar 2014 23:42:39 +0000 (16:42 -0700)]
fill prio and protocol attr bits when parsing cls message

Otherwise, the filter we get from a cls cache can't be used
for removal.

Cc: Thomas Haller <thaller@redhat.com>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Acked-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: Thomas Haller <thaller@redhat.com>
10 years agoremove some useless code in lib/route/cls/u32.c
Cong Wang [Wed, 26 Feb 2014 21:35:13 +0000 (13:35 -0800)]
remove some useless code in lib/route/cls/u32.c

Cc: Thomas Haller <thaller@redhat.com>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: Thomas Haller <thaller@redhat.com>
10 years agofix comments for rtnl_act_add()
Cong Wang [Wed, 26 Feb 2014 21:35:12 +0000 (13:35 -0800)]
fix comments for rtnl_act_add()

Cc: Thomas Haller <thaller@redhat.com>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: Thomas Haller <thaller@redhat.com>
10 years agobasic: make BASIC_ATTR_TARGET optional
Cong Wang [Wed, 26 Feb 2014 21:35:11 +0000 (13:35 -0800)]
basic: make BASIC_ATTR_TARGET optional

At least in kernel TCA_BASIC_CLASSID is optional.

Cc: Thomas Haller <thaller@redhat.com>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: Thomas Haller <thaller@redhat.com>
10 years agoroute: rtnl_route_build_msg() should not overwrite the route scope
Thomas Haller [Thu, 13 Feb 2014 20:31:37 +0000 (21:31 +0100)]
route: rtnl_route_build_msg() should not overwrite the route scope

rtnl_route_build_msg() should allow the user to set the route scope
explicitly to RT_SCOPE_NOWHERE.

This is useful for IPv4 routes, because when deleting a route,
the kernel requires the scope to match, unless the scope is set to
RT_SCOPE_NOWHERE. Thus by setting the scope to RT_SCOPE_NOWHERE,
the user can delete a route, even without knowing its scope.

rtnl_route_build_msg() should only try to guess the scope, if it was
not explicitly specified.

Signed-off-by: Thomas Haller <thaller@redhat.com>
Acked-by: Thomas Graf <tgraf@suug.ch>
10 years agoutils: fix nl_msec2str() which always returned '0msec' for whole second durations
Thomas Haller [Wed, 19 Feb 2014 18:22:13 +0000 (19:22 +0100)]
utils: fix nl_msec2str() which always returned '0msec' for whole second durations

If the duration was without subsecond part, the function always returned
'0msec', instead of giving the time in days, hours, minutes or seconds.

Regression introduced by commit b3fb89f445108677d405c62865b25aeea209d10a.

Signed-off-by: Thomas Haller <thaller@redhat.com>
Acked-by: Thomas Graf <tgraf@suug.ch>