Commit Graph

999 Commits

Author SHA1 Message Date
Thomas Haller
54f6d7d1b3 Merge branch 'tgraf/trivial-fixes'
http://lists.infradead.org/pipermail/libnl/2014-August/001614.html

Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-08-26 13:14:32 +02:00
Thomas Graf
340d5d69c4 src: Silence all warnings
Signed-off-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-08-26 13:09:20 +02:00
Thomas Graf
c231aa4159 xfrm: Remove unused variable sp_id and sa_id
Cc: Sruthi Yellamraju <ysruthi@gmail.com>
Signed-off-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-08-26 13:09:20 +02:00
Thomas Graf
485cefd665 nf: Remove unused function htonll()
Signed-off-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-08-26 13:09:20 +02:00
Thomas Graf
a45fca9a58 xfrm: Remove unused function __assign_addr()
Signed-off-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-08-26 13:09:20 +02:00
Thomas Graf
da80033c2f nf: nfnl_*_str2copy_mode() should return int
... to be able to return a negative error code for unknown modes.

[thaller@redhat.com: This is potentially an ABI break, but since
the size of the enum is implementation defined, it seems
anyway unstable to have them as function arguments/return values.]

http://lists.infradead.org/pipermail/libnl/2014-August/001616.html

Signed-off-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-08-26 13:03:30 +02:00
Thomas Graf
03f3f3c4c0 build: Add continuous integration support via travis-ci
This allows any libnl github repo to link to travis-ci which
will result in new commits and pull requests to be automatically
built with both gcc and clang. Any build failures including the
addition of warnings are reported to the author and committer.

Signed-off-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-08-26 12:41:38 +02:00
Thomas Haller
16e3d61689 tests: build test-create-macvlan as part of make check
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-08-18 15:17:43 +02:00
Thomas Haller
76237f6d63 Merge branch 'hfsc-qdisc-support'
http://lists.infradead.org/pipermail/libnl/2014-July/001566.html
http://lists.infradead.org/pipermail/libnl/2014-July/001594.html

Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-07-30 19:06:03 +02:00
Cong Wang
cacc24ea66 qdisc: add hfsc qdisc 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>
2014-07-30 19:03:56 +02:00
Cong Wang
f904fabcb4 tc: save error code for rtnl_tc_data_check()
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>
2014-07-30 19:03:50 +02:00
Thomas Haller
000dd945b6 Merge branch 'dcbw/inet6_addr_gen'
http://lists.infradead.org/pipermail/libnl/2014-July/001561.html

Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-07-30 18:55:32 +02:00
Dan Williams
558f966782 link/inet6: add link IPv6 address generation mode support
Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-07-30 18:45:51 +02:00
Dan Williams
b51815a9db link: update copy of kernel header include/linux/if_link.h
The next patch will use some of these defines, so update.

Taken from upstream kernel commit bc91b0f07ada5535427373a4e2050877bcc12218,
file 'include/uapi/linux/if_link.h'.

Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-07-30 00:39:24 +02:00
Thomas Haller
2605538632 Merge branch 'declaration-fixes'
Assorted declaration fixes

http://lists.infradead.org/pipermail/libnl/2014-July/001570.html

Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-07-27 11:10:15 +02:00
Thomas Graf
5329f6a6c7 cache_mngt: Make __nl_cache_ops_lookup() static, it was never declared
Signed-off-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-07-27 11:04:07 +02:00
Thomas Graf
99050f2248 cache: Declare nl_cache_ops_set_flags()
Signed-off-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-07-27 11:04:07 +02:00
Thomas Graf
779d1341f8 socket: Be correct, time(2) takes a pointer, not an integer
Signed-off-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-07-27 11:04:07 +02:00
Thomas Graf
70849054f7 act: Include <netlink/route/action.h>
Signed-off-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-07-27 11:04:07 +02:00
Thomas Graf
17f1c386df act: Declare rtnl_act_change()
Signed-off-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-07-27 11:04:07 +02:00
Thomas Graf
a1593c234a neightbl: Declare rtnl_neightbl_set_gc_interval()
Signed-off-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-07-27 11:04:07 +02:00
Thomas Graf
9f848b3084 ematch/cmp: Include <netlink/route/cls/ematch/cmp.h>
Signed-off-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-07-27 11:04:07 +02:00
Thomas Graf
821c189f77 link/inet: Include <netlink/route/link/inet.h>
Signed-off-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-07-27 11:04:07 +02:00
Thomas Graf
73f999607d link/bonding: Include <netlink/route/link/bonding.h>
Signed-off-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-07-27 11:04:07 +02:00
Thomas Graf
a1273ce13c link/ipgre: Include <netlink/route/link/ipgre.h>
Signed-off-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-07-27 11:04:07 +02:00
Thomas Graf
180351cfd1 link/sit: Include <netlink/route/link/sit.h>
Signed-off-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-07-27 11:04:07 +02:00
Thomas Graf
2592a852fb link/ip6tnl: Include <netlink/route/link/ip6tnl.h>
Signed-off-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-07-27 11:04:07 +02:00
Thomas Graf
a13010435a link/ip6tnl: Declare rtnl_link_is_ip6_tnl()
Signed-off-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-07-27 11:04:07 +02:00
Thomas Graf
69dd5ecea9 htb: Declare rtnl_htb_set_level()
Signed-off-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-07-27 11:04:07 +02:00
Thomas Haller
01784b72da 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>
2014-07-27 11:01:14 +02:00
Thomas Haller
371d1a0790 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>
2014-07-27 10:57:36 +02:00
Thomas Haller
fc249f81c7 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>
2014-07-27 10:57:31 +02:00
Dan Williams
9dc6e6da90 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>
2014-07-25 22:37:41 +02:00
Cong Wang
944b982cc5 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>
2014-07-24 19:58:35 +02:00
Cong Wang
956b758f7e 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>
2014-07-21 19:59:39 +02:00
Thomas Haller
5f9eedc22d Merge branch 'xfrm'
http://lists.infradead.org/pipermail/libnl/2014-June/001503.html

Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-07-20 18:33:17 +02:00
Thomas Haller
51941b1356 xfrm: style-fixes
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-07-20 18:15:16 +02:00
Sruthi Yellamraju
9171544708 xfrm: add xfrm support
Signed-off-by: Sruthi Yellamraju <ysruthi@gmail.com>
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-07-20 18:14:46 +02:00
Thomas Haller
dcc5375977 libnl-3.2.25 release
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-07-16 11:19:12 +02:00
Cong Wang
c4d700038b 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>
2014-07-16 10:59:25 +02:00
Thomas Haller
94e1345873 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>
2014-07-07 11:33:24 +02:00
Thomas Haller
c62cda91f7 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>
2014-07-07 11:12:38 +02:00
Thomas Graf
9c2dbdfba5 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>
2014-06-29 18:38:30 +02:00
Thomas Haller
9e0960c150 doc: state in documentation that libnl3 is supposed to work with 3.x kernels
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-06-27 19:41:35 +02:00
Thomas Haller
0446731124 libnl-3.2.25-rc1 release
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-06-25 12:57:13 +02:00
Thomas Haller
558df52e6e 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>
2014-06-25 12:37:58 +02:00
Thomas Haller
940e5d5446 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>
2014-06-25 12:35:45 +02:00
Sruthi Yellamraju
853c045ada 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>
2014-06-25 10:17:01 +02:00
Thomas Haller
baaf82d6d6 Merge branch 'coverity-fixes-2'
http://lists.infradead.org/pipermail/libnl/2014-June/001507.html

Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-06-25 09:26:49 +02:00
Peter Wu
a8b352a4c5 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>
2014-06-25 09:16:50 +02:00