Commit Graph

60 Commits

Author SHA1 Message Date
Eyal Birger
d147019c4b xfrmi: introduce XFRM interfaces support
XFRM interfaces were introduced in kernel 4.19.
This commit adds link support for these interfaces.

Signed-off-by: Eyal Birger <eyal.birger@gmail.com>
2019-09-01 14:24:52 +02:00
Michael Forney
73c1d04796 Sync linux headers to 4.19.66
This fixes the build with musl libc.

Additionally, several changes were made to account for changes to the
headers:

- ip_mp_alg.h was removed, since it was removed in linux commit e06e7c61
  (v2.6.23), and the last use of those constants was removed in libnl
  commit 535e8316.
- Uses of TCF_META_ID_SK_ROUTE_CAPS were updated to
  __TCF_META_ID_SK_ROUTE_CAPS, since it was renamed in linux commit
  e20e6940 (v3.1).
- Uses of IF_CARRIER_DOWN and IF_CARRIER_UP were replaced with their
  values, 0 and 1, since they are not in linux/if.h (they appear to be
  libnl-specific, added in libnl commit 3540e44b).

https://github.com/thom311/libnl/pull/222
2019-08-26 15:27:32 +02:00
Michael Forney
de72910e6b all: Avoid pointer arithmetic on void *
ISO C requires that the pointer operand to the binary + operator be to
a complete object type[0].

[0] http://port70.net/~nsz/c/c11/n1570.html#6.5.6p2
2019-08-16 07:42:03 +02:00
Volodymyr Bendiuga
b004e40063 route:act: add vlan action
For more information please see:
http://man7.org/linux/man-pages/man8/tc-vlan.8.html

Signed-off-by: Volodymyr Bendiuga <volodymyr.bendiuga@westermo.se>
2018-10-10 11:12:08 +02:00
Volodymyr Bendiuga
07fa87ba90 include: import tc_vlan.h
Signed-off-by: Volodymyr Bendiuga <volodymyr.bendiuga@westermo.se>
2018-10-10 11:12:08 +02:00
Thomas Haller
4702d53679 build: cleanup Makefile.am
Sort files asciibetically and add $(NULL) sentinel to
Makefile lines.
2018-10-08 13:22:28 +02:00
Volodymyr Bendiuga
25cf1d39ed route:qdisc: add MQPRIO Qdisc
More about Qdisc mqprio can be found at:
http://man7.org/linux/man-pages/man8/tc-mqprio.8.html

Signed-off-by: Volodymyr Bendiuga <volodymyr.bendiuga@westermo.se>
2018-07-26 11:17:37 +02:00
d0u9
ddfc36f46e Add support for cloning cgroup filter object.
In this commit, we implement ematch_tree_clone(), which is basis of
cgroup_clone() interface. The whole ematch tree is deep-copied except
the e_ops filed.

Also, a new unit test is added for testing the interface, which named as
check-ematch-tree-clone.c located in tests directory.

https://github.com/thom311/libnl/pull/176
2018-06-25 14:39:41 +02:00
Volodymyr Bendiuga
5893c3f18e route:cls: add matchall classifier
This simple classifier allows any traffic pass through.
Useful as an example for port mirroring.

Signed-off-by: Volodymyr Bendiuga <volodymyr.bendiuga@westermo.se>
2018-04-11 12:22:16 +02:00
Thomas Haller
b7504b8b64 build: sort entries in Makefile.am and .gitignore by name 2018-04-06 19:44:57 +02:00
Lukáš Karas
6c6c74a788 add demo program for listen conntrack events 2018-04-06 19:27:33 +02:00
Thomas Haller
cb8e34859b lib/rtnl: rename public define RTNL_GENEVE_ID_MAX
Public defines must have a libnl3 related prefix. Rename
GENEVE_ID_MAX to RTNL_GENEVE_ID_MAX.
2018-02-12 15:23:02 +01:00
Wang Jian
6b4fc607ba link: add Geneve support.
Signed-off-by: Wang Jian <jianjian.wang1@gmail.com>
2018-02-12 14:36:15 +01:00
Marcos Paulo de Souza
d747083a3c tests: Add test to {de}activate loopback interface
This tests is much more like an example of how to do it, and also works
as a test to check if rtnl_link_change is working as expected when it
comes to loopback interface.

Signed-off-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com>

https://github.com/thom311/libnl/pull/161
2018-01-16 09:00:28 +01:00
Jeroen Roovers
148516c86b build: add missing headers for issue #152
Also, sort all headers.

https://github.com/thom311/libnl/issues/152
https://github.com/thom311/libnl/pull/153
2017-09-21 13:30:55 +02:00
Thomas Haller
e31ac230c4 build: add new include/netlink-private/route/*.h files to Makefile.am 2017-08-18 15:01:30 +02:00
David Ahern
760d74f99c route: Add support for MPLS encap
Add support for MPLS lwtunnel encapsulation.

Signed-off-by: David Ahern <dsahern@gmail.com>
2017-08-18 15:01:04 +02:00
David Ahern
0164d57aee route: Add support for lwtunnel encapsulations
Add framework to support lwtunnel encapsulations per nexthop.

Encapsulations types are expected to fill in the nh_encap_ops for
building and parsing messages, compare encapsulations in routes,
dumping the encapsulations and freeing memory.

Signed-off-by: David Ahern <dsahern@gmail.com>
2017-08-18 15:01:04 +02:00
David Ahern
665fccadca addr: Add implementations for mpls_ntop and mpls_pton
Implementations of mpls_ntop and mpls_pton taken from iproute2.

Signed-off-by: David Ahern <dsahern@gmail.com>
2017-08-18 15:01:04 +02:00
Thomas Haller
b7408da1cf build: add include/linux-private/linux/mpls.h to Makefile.am 2017-08-18 15:00:46 +02:00
Thomas Haller
144c6c5e6a build: don't build cli libraries by default
When configuring with --enable-cli=no, we should not build
the libraries related the cli.

This fixes commit 3cb2853 (build: enable building cli during tests)
which enables building of cli during `make check`. However, during
regular build, these libraries should not get build.

Signed-off-by: Thomas Haller <thaller@redhat.com>
2017-05-12 12:46:34 +02:00
David Ahern
d55f004c5a route: Add support for netconf
Add route/netconf cache type to monitor RTM_*NETCONF messages.

v2
- change get methods to return 0/error and take 'int *val'
  which is set to the value requested

Signed-off-by: David Ahern <dsa@cumulusnetworks.com>
Signed-off-by: Balakrishnan Raman <ramanb@cumulusnetworks.com>
Signed-off-by: Thomas Haller <thaller@redhat.com>
2017-05-12 10:09:15 +02:00
Thomas Haller
011b6cc726 build: fix creating directories for generated sources
Fixes: a572196366
2017-02-27 18:26:14 +01:00
Thomas Haller
fe507dbdd3 build: pass --disable-dependency-tracking to make distcheck 2017-02-27 18:02:10 +01:00
Thomas Haller
839aec3536 build: ensure build directory for generated sources exist
For out-of-tree builds, we must ensure that the build directory
for the generated sources exists. We do that by adding a dependency
to the .dirstamp file.
2017-02-27 18:02:06 +01:00
Thomas Haller
eabd9f2334 build: enable more warnings 2017-02-27 14:10:02 +01:00
Thomas Haller
5d4a545dec all: enable -Wmissing-prototype warning for all components 2017-02-27 14:01:22 +01:00
Thomas Haller
812e16a77f build: move compiler warning flags to separate autoconf variable 2017-02-27 13:36:03 +01:00
Thomas Haller
3cb28534d3 build: enable building cli during tests
The cli programs don't have any additional external dependencies.
So, during a `make check`, we should always build them, even if
they were disabled during configure and won't be installed.
2017-02-27 13:36:03 +01:00
Thomas Haller
cf2ccbd5cc build: merge src/Makefile.am into top-level makefile 2017-02-27 13:36:03 +01:00
Thomas Haller
061d4fd8b8 build: merge src/lib/Makefile.am into top-level makefile 2017-02-27 13:36:03 +01:00
Thomas Haller
7b375953fa build: merge tests/Makefile.am into top-level makefile 2017-02-27 13:20:34 +01:00
Thomas Haller
c1567ea637 build: merge python/Makefile.am into top-level makefile 2017-02-27 13:20:34 +01:00
Thomas Haller
bee04e40f3 build: merge man/Makefile.am into top-level makefile 2017-02-27 13:20:34 +01:00
Thomas Haller
a572196366 build: merge lib/Makefile.am into top-level makefile 2017-02-27 13:20:34 +01:00
Thomas Haller
f9890fa54f build: merge include/Makefile.am into top-level makefile 2017-02-27 13:20:34 +01:00
Thomas Haller
5013d19657 build: cleanup top-level Makefile.am 2017-02-26 19:47:10 +01:00
Thomas Haller
541b249358 build: add linker scripts for libnl-cli-3.so library
libnl-cli-3.so was unversioned previously. This is an
ABI change (but backward compatible).

Signed-off-by: Thomas Haller <thaller@redhat.com>
2015-02-02 17:28:06 +01:00
Thomas Haller
e7d57da0dd build: add individual linker version scripts for shared libraries
Instead of using a shared version script 'libnl.sym', add individual
linker scripts for all libnl libraries.

For now, the content of the version script is unchanged and this
patch does not have any externally visible changes.

Signed-off-by: Thomas Haller <thaller@redhat.com>
2015-02-02 17:28:06 +01:00
Sébastien Barré
1578095b8a build: generate libnl-idiag-3.0.pc
That file was not generated due to a missing line in Makefile.am
and configure.ac

http://lists.infradead.org/pipermail/libnl/2014-September/001649.html

Signed-off-by: Sébastien Barré <sebastien.barre@uclouvain.be>
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-09-22 11:06:05 +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 Graf
91ab1bea5e make: automake provides a cscope target these days
Signed-off-by: Thomas Graf <tgraf@suug.ch>
2012-12-21 13:30:21 +01:00
Thomas Graf
5535f59746 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>
2012-10-22 12:09:03 +02:00
Thomas Graf
65c3919ff4 Only include doc/ in dist 2012-10-19 16:35:28 +02:00
Thomas Graf
9af5469004 tests: Convert tests/Makefile to use automake 2012-04-21 10:34:43 +02:00
Jan Engelhardt
88940b71f8 build: simplify optional dirs/files in Makefile.am processing 2011-11-11 11:55:29 +01:00
Jiří Župka
f90dc636cb Add libnl-cli-3.0 to pkg-config tool
Signed-off-by: Jiří Župka <jzupka@redhat.com>
2011-10-10 11:39:24 +02:00
Thomas Graf
67bd56f214 Fix a73cb2f26 fallout to allow building in separate directory
Commit a73cb2f269 missed to change the
EXTRA_DATA section
2011-09-13 23:33:06 +02:00
Thomas Graf
4c210adcb5 Switch to libtool versioning system
It has been a request that multiple libnl versions should be installabe
in parallel.

In order to achieve this, the basename of the library was changed to
libnl-3 which reflects the 3rd generation of libnl APIs. It also means
that release based library versioning is left behind and libtool
versioning is used instead.

Projects using pkgconfig will automatically link against the new library
basename and will not notice a difference.

The SO versioning is based on the glib model:
  current := 100 * minor + micro - revision
  revision := revision
  age := age (number of backwards compatible versions)
2011-09-13 22:58:08 +02:00
Jan Engelhardt
a73cb2f269 build: always install files into /etc/libnl
I observed that with the RedHat build target in the Open Build
Service, files were put into /etc rather than /etc/libnl.
Self-referential variables are a bad idea, and so just avoid this.
2011-09-13 13:19:26 +02:00