Commit Graph

445 Commits

Author SHA1 Message Date
Jef Oliver ab17f9803d lib/route: Allow override of IFLA_AF_SPEC nesting
This patch adds the ability to override nesting into an AF specific
attribute. An example of this is the bridge module.

Regular Nesting:
[IFLA_AF_SPEC]
    [AF_INET]
        [AF_INET_ATTRS]

Bridge Nesting:
[IFLA_AF_SPEC]
    [AF_BRIDGE_ATTRS]

This patch adds ao_fill_af_no_nest to struct rtnl_link_af_ops.
When set to non-zero, this will override the nested AF attribute
and allow nesting of attributes directly into IFLA_AF_SPEC.

Signed-off-by: Jef Oliver <jef.oliver@intel.com>
Signed-off-by: Thomas Haller <thaller@redhat.com>
2016-09-24 13:51:29 +02:00
Jef Oliver 9be1849eab lib/route: Extend Bridge Flags
This patch adds support for the following bridge port flags:

IFLA_BRPORT_UNICAST_FLOOD
IFLA_BRPORT_LEARNING
IFLA_BRPORT_LEARNING_SYNC

Signed-off-by: Jef Oliver <jef.oliver@intel.com>
Signed-off-by: Thomas Haller <thaller@redhat.com>
2016-09-24 13:51:29 +02:00
Jef Oliver e17a15a057 lib/route: Add port state translation functions
This patch adds translation functions for translating the port
state between integers and strings.

Signed-off-by: Jef Oliver <jef.oliver@intel.com>
Signed-off-by: Thomas Haller <thaller@redhat.com>
2016-09-24 13:51:29 +02:00
Davide Caratti a355b9a53b remove multiple implementations of htonll(), ntohll()
use a single #define in include/netlink-private/utils.h

Signed-off-by: Davide Caratti <davide.caratti@gmail.com>
2016-09-06 11:21:48 +02:00
Davide Caratti 6cfe71ef15 macsec: fix maximum ICV length
Update copy of kernel header 'if_macsec.h' to Linux 4.8-rc5, so that
upstream commit 2ccbe2cb79f2f74ab739252299b6f9ff27586f2c ("macsec: limit
ICV length to 16 octets") is included. Return -NLE_INVAL when trying to
configure an ICV length greater than 16 octets.

Signed-off-by: Davide Caratti <davide.caratti@gmail.com>
2016-09-05 18:38:27 +02:00
Jef Oliver 998d107cd8 lib/route: set IFLA_PROTINFO attribute in request message
This patch adds the functionality to set IFLA_PROTINFO in a
request. This allows for appending protocol specific information
to a request message.

This patch adds ao_fill_pi to the rtnl_link_af_ops structure. This
registers a function to fill the IFLA_PROTINFO attribute. This
function follows the makeup of ao_fill_af.

This patch adds ao_fill_pi_flags to the rtnl_link_af_ops
structure. This registers an extra flag that can be bitmasked
onto the IFLA_PROTINFO definition. This is useful for address
families that require NLA_F_NESTED.

This patch adds a function named af_fill_pi, which is called by
build_link_msg. This function calls the registered function
pointers for an address family to fill IFLA_PROTINFO and to
bitmask any extra flags.

Signed-off-by: Jef Oliver <jef.oliver@intel.com>
Signed-off-by: Thomas Haller <thaller@redhat.com>
2016-08-29 13:09:37 +02:00
Jef Oliver 5860c205d4 lib/route: allow override of message type during link change
When rtnl_link_build_change_request() builds a change request,
it sets the message type to RTM_NEWLINK by default. If the
request fails, it changes the type to RTM_SETLINK, and resubmits.

For some address families, this will result in a requested change
never being applied by the kernel. An exmaple of this is the Linux
bridge. When a netlink message of type RTM_NEWLINK is recieved,
rather than failing, it simply ignores the message and does not
return a failure.

To fix this, this patch implements an override for address
families that require it. The override can be set when an address
family registers itself in libnl.

This patch adds ao_override_rtm to the rtnl_link_af_ops structure.
This patch adds a static function named af_request_type.
This patch modifies rtnl_link_build_change_request to call
  af_request_type to properly set the request type if an address
  family wishes to override.

Signed-off-by: Jef Oliver <jef.oliver@intel.com>
Signed-off-by: Thomas Haller <thaller@redhat.com>
2016-08-29 13:09:29 +02:00
Jeff Squyres 746bbba3e5 compat: add linux/socket.h for __kernel_sa_family_t
The __kernel_sa_family_t type is not present on older systems (e.g.,
RHEL 6), and libnl3 will not built without it.  Copy
/usr/include/linux/socket.h from a RHEL7 system to
include/linux-private/linux/socket.h so that it will be found by the
build system.

Fortunately, this socket.h is small and self-contained; it contains
very little (and does not #include any other files) beyond necessary
type.

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

Signed-off-by: Jeff Squyres <jsquyres@cisco.com>
Signed-off-by: Thomas Haller <thaller@redhat.com>
2016-08-29 12:49:45 +02:00
André Draszik 683f27fbb6 lib: add utility function nl_strerror_l()
libnl currently uses strerror_r() throughout, but this is
problematic because there is a non-standard GNU version
implemented in glibc, and the standard POSIX version, which
differ in signature. When using glibc, one can choose
between the two versions using feature test macros
_GNU_SOURCE and _POSIX_C_SOURCE.

Given libnl is built using the former, we always get the
glibc special version, and all code so far has been written
for that non-standard version.

Other C libraries like musl on the other hand only try
to be posix compliant, and only ever provide the posix
version of strerror_r(), which has a different signature.

The alternative is to use strerror_l() rather than
strerror_r() http://austingroupbugs.net/view.php?id=655
- this will avoid the non-confirming versions issue
- strerror_l() is now recommended by POSIX to replace
  strerror_r() usage

So rather than changing all uses of strerror_r() to be in
line with posix, we are going to switch to the recommended
interface strerror_l().

Since strerror_l() is slightly more difficuly to use, we
add a little (private) wrapper that we can use from all
current callsites of strerror_r().

Signed-off-by: André Draszik <adraszik@tycoint.com>
Reviewed-by: Stephane Ayotte <sayotte@tycoint.com>
Signed-off-by: Thomas Haller <thaller@redhat.com>
2016-08-25 17:32:57 +02:00
Thomas Haller b3dfa79010 nl-addr: avoid read-out-of-bound in nl_addr_fill_sockaddr()
https://github.com/thom311/libnl/issues/103

Signed-off-by: Thomas Haller <thaller@redhat.com>
2016-08-14 11:46:19 +02:00
Thomas Haller 99b1d8acf8 lib: capability NL_CAPABILITY_RTNL_ADDR_PEER_ID_FIX for ID comparison of v4 addresses
The ID attributes for IPv4 addresses were broken which causes wrong
nl_object_identical() and cache lookup.

This capability shall indicate that the bug was fixed.

Signed-off-by: Thomas Haller <thaller@redhat.com>
2016-08-14 11:07:01 +02:00
Peter Wu f6b7a7f974 cli: add noreturn attributes
Teach static code analyzers (such as Clang static analyzer) that code
following nl_cli_fatal can never be executed. Avoids false positives
such as detecting use of NULL pointers when that cannot happen.

Signed-off-by: Peter Wu <peter@lekensteyn.nl>
Signed-off-by: Thomas Haller <thaller@redhat.com>
2016-08-14 09:57:25 +02:00
Craig Gallek 625c8f13cf build: fixup headers for C++ inclusion
- Fix typos in extern "C" wrappers.
- 'class' is a reserved word, change to cls.
- int -> enum casts are not automatic.
- Static strings must be of type const char*
- Add a few implicit header dependencies explicitly.

http://lists.infradead.org/pipermail/libnl/2016-July/002165.html

Signed-off-by: Craig Gallek <kraig@google.com>
Signed-off-by: Thomas Haller <thaller@redhat.com>
2016-08-12 23:00:18 +02:00
Thomas Haller 656f381ccf libnl-3.2.28 release
Signed-off-by: Thomas Haller <thaller@redhat.com>
2016-07-08 11:41:42 +02:00
Thomas Haller 9fa986bde7 build: fix adding macsec files to include/Makefile.am
Fixes: 885ff4ae1e
2016-06-30 12:54:08 +02:00
Thomas Haller 3711d44e32 route/addr: add capability NL_CAPABILITY_RTNL_ADDR_PEER_FIX to indicate address fixes
Signed-off-by: Thomas Haller <thaller@redhat.com>
2016-06-29 10:26:24 +02:00
Thomas Haller 83e851ca9c route/addr: fix ID comparison for AF_INET and AF_INET6 addresses
For AF_INET/IPv4 addresses, the ID equality comparison must include
the net-part of the peer address:

    unshare -n
    ip link add T type dummy
    ip link set T up
    ip addr add 192.168.5.10/24 dev T
    ip addr add 192.168.5.10 peer 192.168.6.1/24 dev T
    ip addr add 192.168.5.10 peer 192.168.7.1/24 dev T
    ip addr add 192.168.5.10 peer 192.168.7.2/24 dev T
    # RTNETLINK answers: File exists

    ip addr change 192.168.5.10 peer 192.168.7.2/24 dev T
    ip addr show | grep 192.168.7.
    # inet 192.168.5.10 peer 192.168.7.1/24 scope global T

For AF_INET6/IPv6 addresses, the prefix length of the address
is not part of the ID:

    unshare -n
    ip link add T type dummy
    ip link set T up
    ip addr add 192.168.7.10/24 dev T
    ip addr add 192.168.7.10/23 dev T
    ip addr add 1:2:3:4:5::1/64 dev T
    ip addr add 1:2:3:4:5::1/63 dev T
    # RTNETLINK answers: File exists

    ip addr change 1:2:3:4:5::1/63 dev T
    ip addr show | grep 1:2:3:4:5::1
    # inet6 1:2:3:4:5::1/64 scope global

*sigh*

http://lists.infradead.org/pipermail/libnl/2016-June/002158.html

Signed-off-by: Thomas Haller <thaller@redhat.com>
2016-06-29 10:26:00 +02:00
Thomas Haller ca5d662e9d xfrm: allow avoiding buffer overflow for key in xfrmnl_sa_get_*_params()
The previous API of xfrmnl_sa_get_*_params() would always require
a @key buffer, but it was not possible to avoid buffer overflow
because the required size was unknown.

That is not really fixable, because the old API is broken.

Now, allow omitting the @key argument to only request the @key_size.
That allows the caller to ask beforehand how large the @key buffer
must be: ((@key_size + 7) / 8).

Unfortunately, omitting the key against previous versions of libnl
leads to a crash. And passing a key against older versions makes it
impossible to avoid buffer-overflow.

Another option would be to add functions like
xfrmnl_sa_get_crypto_params_keylen() so the user can query the required
buffer size by calling that instead of xfrmnl_sa_get_crypto_params().
However, then the user also requires a backport of the new API
and this will not be possible against older libnl3 versions either.
Thus, if the user already requires the fix, he can just as well
require a backport of this patch and then safely call xfrmnl_sa_get_crypto_params()
without @key argument. This way has the advantage/disadvantage, that
it can detect the presence of the patch at runtime.

The cumbersome way to get it right would be:

    unsiged key_len;
    char *key;
    int r;

    if (!nl_has_capability(17 /*NL_CAPABILITY_XFRM_SA_KEY_SIZE*/)) {
        /* no way to use this API safely. Abort. */
        return -NLE_OPNOTSUPP;
    }

    r = xfrmnl_sa_get_crypto_params(sa, NULL, &key_len, NULL);
    if (r < 0)
         return r;
    key = malloc((key_len + 7) / 8);
    if (!key)
         return -NLE_NOMEM;
    r = xfrmnl_sa_get_crypto_params(sa, NULL, &key_len, &key);
    if (r < 0) {
        free(key);
        return r;
    }
    ...

http://lists.infradead.org/pipermail/libnl/2016-June/002155.html

Signed-off-by: Thomas Haller <thaller@redhat.com>
2016-06-29 10:16:04 +02:00
Sabrina Dubroca 885ff4ae1e lib/route: add macsec support
Signed-off-by: Sabrina Dubroca <sd@queasysnail.net>
2016-06-25 18:27:14 +02:00
Sabrina Dubroca 6ecba6e440 import macsec uapi headers
Signed-off-by: Sabrina Dubroca <sd@queasysnail.net>
2016-06-25 18:27:14 +02:00
Sabrina Dubroca 9702bb14ff pass flags through ->io_compare op
Currently rtnl_link_info_data_compare doesn't pass
flags (LOOSE_COMPARISON) to the ->io_compare op, so we cannot do a match
on only the attributes that are actually set in the filter object used
in a cache lookup via nl_cache_find().

Signed-off-by: Sabrina Dubroca <sd@queasysnail.net>
Signed-off-by: Thomas Haller <thaller@redhat.com>
2016-06-25 17:51:45 +02:00
Thomas Egerer 6a9b59ca73 xfrm: make character pointers in setters const
All of these pointers are either strcpy'd or memcpy'd and usually const
in a calling application. Changing them to const in the header does not
break the compatibility and allows for users with const pointers to use
the library without compiler warnings.

Signed-off-by: Thomas Egerer <thomas.egerer@secunet.com>
Signed-off-by: Thomas Haller <thaller@redhat.com>

http://lists.infradead.org/pipermail/libnl/2016-June/002137.html
2016-06-25 14:03:50 +02:00
Przemyslaw Szczerbik 424b3b6d0d lib: return error on Netlink attribute length overflow
Netlink attribute length is defined as u16. It's possible to exceed nla_len when
creating nested attributes. Storing incorrect length due to overflow will cause
a reader to read only a part of nested attribute or skip it entirely.

As a solution cancel the addition of a nested attribute when nla_len size is
exceeded.

Signed-off-by: Przemyslaw Szczerbik <przemek.szczerbik@gmail.com>
Signed-off-by: Thomas Haller <thaller@redhat.com>

http://lists.infradead.org/pipermail/libnl/2016-May/002131.html
2016-06-24 19:32:25 +02:00
Thomas Haller 8dce6de701 link: allow overwriting IFLA_EXT_MASK flag in ao_get_af() function
Instead of setting it twice, once during link_request_update() and
later in bridge_get_af(), pass ext_filter_mask to ao_get_af().

Signed-off-by: Thomas Haller <thaller@redhat.com>
2016-06-24 19:25:55 +02:00
Jonas Johansson 3bf503d30c neigh: add function to look up neighbour (fdb) by ifindex, mac and vlan
The rtnl_neigh_get() function can not be used to look up a fdb entry in the
neigh cache. This is due to that the function searches among destination
addresses (NDA_DST) and not among link layer addresses (NDA_LLADDR), which is
used by fdb entries. A fdb entry can also exist in several vlans, so a vlan id
parameter is also needed to find a unique entry.
This commit adds a function, rtnl_neigh_get_by_vlan() which searches the neigh
cache for a specific neighbour (fdb) entry by interface index, link layer
address and vlan id.

Signed-off-by: Jonas Johansson <jonas.johansson@westermo.se>
Signed-off-by: Thomas Haller <thaller@redhat.com>

http://lists.infradead.org/pipermail/libnl/2016-May/002124.html
https://github.com/thom311/libnl/pull/98
2016-05-29 15:19:22 +02:00
Thomas Haller 207dc03527 sit: add public API for sit 6RD support
Signed-off-by: Thomas Haller <thaller@redhat.com>
2016-04-15 16:24:15 +02:00
Thomas Haller 962afc32df sit: fix invalid declaration of rtnl_link_sit_get_proto() in sit.h
Fixes: d715b8a5f6

Signed-off-by: Thomas Haller <thaller@redhat.com>
2016-04-15 16:24:15 +02:00
Haishuang Yan eec318f026 ipgre: add support for gretap tunnel
Since kernel support both gre/gretap tunnel, so add support
for gretap appropriately.

Signed-off-by: Haishuang Yan <yanhaishuang@cmss.chinamobile.com>
Signed-off-by: Thomas Haller <thaller@redhat.com>

[thaller@redhat.com: modified original patch to move symbols
 in libnl-route-3.sym to proper section]

http://lists.infradead.org/pipermail/libnl/2016-April/002102.html
2016-04-15 16:18:41 +02:00
Przemyslaw Szczerbik cdf2d4baf3 lib: add type casting for nla_for_each_nested macro
g++ is unable to compile code with nla_for_each_nested macro due to
implicit type conversion from void* to nlattr*. This patch adds type
casting for nla_for_each_nested macro to address this issue.

Signed-off-by: Przemyslaw Szczerbik <przemek.szczerbik@gmail.com>
Signed-off-by: Thomas Haller <thaller@redhat.com>

http://lists.infradead.org/pipermail/libnl/2016-February/002095.html
2016-02-25 19:42:56 +01:00
Thomas Haller 926e7777e3 lib/utils: add NL_CAPABILITY_NL_OBJECT_DIFF64 capability
Signed-off-by: Thomas Haller <thaller@redhat.com>
2016-02-12 18:20:42 +01:00
David Ahern a09b855814 lib: update ce-mask to uint64_t
lib/route/link.c already defines 32 attributes which fills the current
uint32_t used for ce_mask. To accommodate more attributes the mask needs
to be expanded. This patch updates the definition to uint64_t.

The nl_object_diff API is maintained for ABI with existing users. A new
nl_object_diff64 API is added for the expanded attribute list. The MSB
of the 32-bit API is used to indicate if higher order attributes had a
mismatch. (Suggested by Thomas).

Note that LINK_ATTR_LINK_NETNSID changes. But since the attribute flags
are not public API it shouldn't be a problem.

http://lists.infradead.org/pipermail/libnl/2015-December/002078.html
http://lists.infradead.org/pipermail/libnl/2015-December/002083.html

Signed-off-by: David Ahern <dsa@cumulusnetworks.com>
Signed-off-by: Thomas Haller <thaller@redhat.com>
2016-02-12 18:09:04 +01:00
Nick Lewycky 58396ae2ae remove null dereference from netlink/link.h
Replace a null pointer dereference with a use of the 'offsetof' macro in stddef.h.

http://lists.infradead.org/pipermail/libnl/2016-January/002085.html

Signed-off-by: Nick Lewycky <nlewycky@google.com>
Signed-off-by: Thomas Haller <thaller@redhat.com>
2016-02-12 13:21:40 +01:00
Tobias Jungel 6e54fd2bed route/link/bridge: fixed return type
Fixes: 6555b0d

https://github.com/thom311/libnl/pull/94
2015-12-16 14:52:54 +01:00
David Ahern 05631628a5 bridge: add support for VLANs
Add operation for requesting VLAN data for AF_BRIDGE and parsing of
IFLA_AF_SPEC for AF_BRIDGE. VLANs are saved in a bitmap.

Also add dumping of vlan info to link list and neigh list.
For example:

$ nl-link-list --details --family=bridge
br1 ether 8e:6e:0e:86:e5:86 master br1 <broadcast,multicast,up,running,lowerup>
    mtu 1500 txqlen 0 weight 0 index 18
    mode default carrier down
    bridge: pvid 1   all vlans: 1 301-400 601-610   untagged vlans: 1
bond1 ether 46:ef:e1:c9:46:fe <broadcast,multicast,master>
    mtu 1500 txqlen 0 weight 0 index 20
    state down mode default carrier down
    bridge:

Signed-off-by: Wilson Kok <wkok@cumulusnetworks.com>
Signed-off-by: David Ahern <dsa@cumulusnetworks.com>
[thaller@redhat.com: modified original patch to use ao_parse_af_full().
  Also renaming new API and drop some #defines]
Signed-off-by: Thomas Haller <thaller@redhat.com>
2015-12-07 12:20:22 +01:00
Thomas Haller b2e7199cab include/linux: update copy of kernel headers
Taken from upstream kernel commit 6a13feb9c82803e2b815eca72fa7a9f5561d7861
(v4.3)).

Signed-off-by: Thomas Haller <thaller@redhat.com>
2015-12-07 11:44:36 +01:00
David Ahern b3aeeadd78 lib: handle family-based parsing of IFLA_AF_SPEC attribute
The encoding of the IFLA_AF_SPEC attribute varies depending on the family
used for the request (RTM_GETLINK) message. For AF_UNSPEC the encoding
has another level of nesting for each address family with the type encoded
first. i.e.,
    af_spec = nla_nest_start(skb, IFLA_AF_SPEC)
    for each family:
        af = nla_nest_start(skb, af_ops->family)
        af_ops->fill_link_af(skb, dev, ext_filter_mask)
        nest_end
    nest_end

This allows the parser to find the address family by looking at the first
type.

Whereas AF_BRIDGE encoding is just:
    af_spec = nla_nest_start(skb, IFLA_AF_SPEC)
    br_fill_ifvlaninfo{_compressed}(skb, vg)
    nest_end

which means the parser can not use the attribute itself to know the family
to which the attribute belongs.

Signed-off-by: David Ahern <dsa@cumulusnetworks.com>
[thaller@redhat.com: refactor code by merging a later patch by
 tobias.jungel@bisdn.de and introduce new function ao_parse_af_full()]
Signed-off-by: Thomas Haller <thaller@redhat.com>
2015-12-07 11:42:29 +01:00
David Ahern 1b2c247571 link: add AF operation to append attributes to a GETLINK message
Upcoming bridge patch wants to add IFLA_EXT_MASK attribute to RTM_GETLINK
requests to retrieve VLAN data. Expand request message to a full ifinfomsg
header and call to hook to append attributes if it exists for an address
family.

Signed-off-by: David Ahern <dsa@cumulusnetworks.com>
[thaller@redhat.com: fix memleak in link_request_update()]
Signed-off-by: Thomas Haller <thaller@redhat.com>
2015-12-07 11:41:35 +01:00
David Ahern 4b205cab17 route/link/vxlan: add support for link_info compare
Signed-off-by: Balki Raman <ramanb@cumulusnetworks.com>
Signed-off-by: David Ahern <dsa@cumulusnetworks.com>
[thaller@redhat.com: whitespace, add capability, consider local6/group6]
Signed-off-by: Thomas Haller <thaller@redhat.com>
2015-11-20 11:25:34 +01:00
David Ahern d1c0190241 route/link: add link info compare operation
Signed-off-by: Balki Raman <ramanb@cumulusnetworks.com>
Signed-off-by: David Ahern <dsa@cumulusnetworks.com>
Signed-off-by: Thomas Haller <thaller@redhat.com>
2015-11-20 11:15:33 +01:00
Beniamino Galvani 3fedee55b8 route/link: fix dump of parent link for some link types
Some link types incorrectly dump their own interface name as parent
link; fix this.

Signed-off-by: Beniamino Galvani <bgalvani@redhat.com>
Signed-off-by: Thomas Haller <thaller@redhat.com>
2015-11-19 17:40:17 +01:00
Beniamino Galvani 3f231213c7 route/link: add macvtap support
This adds support for MAC-VLAN based tap interfaces (macvtap).

http://lists.infradead.org/pipermail/libnl/2015-October/001976.html

Signed-off-by: Beniamino Galvani <bgalvani@redhat.com>
Signed-off-by: Thomas Haller <thaller@redhat.com>
2015-11-19 17:20:28 +01:00
David Ahern 18d60cb9d7 link/neigh: add flags option to link and neighbor caches
Both link and neighbor cache support specify multiple groups (nl_af_group),
but the alloc_cache functions for both do not set the NL_CACHE_AF_ITER
flag before populating the cache so only the first group is used by
default. This patch adds an API to pass in flags to make that happen
and updates the nl-neigh-list command to make use of it.

http://lists.infradead.org/pipermail/libnl/2015-October/001996.html

Signed-off-by: David Ahern <dsa@cumulusnetworks.com>
Signed-off-by: Thomas Haller <thaller@redhat.com>
2015-11-19 16:48:21 +01:00
Thomas Haller 7ea15f60a7 route/vlan: allow clearing vlan ingress map
An entry of the ingress map can be cleared by setting
the "to" part to zero.

Previously, vlan_put_attrs() would skip over zero "to"
and thus the user cannot unset an ingress map entry.

Add a modified-mask to record the state of each ingress
map entry and also sent explicit zeros to kernel.

when we receive a IFLA_VLAN_INGRESS_QOS message from kernel,
vlan_parse() similarly sets the received entries as modified.
This preserves previous behavior when using a received object
to modify a vlan.

Add a capability NL_CAPABILITY_RTNL_LINK_VLAN_INGRESS_MAP_CLEAR
to indicate the behavioral change.

Signed-off-by: Thomas Haller <thaller@redhat.com>
2015-11-19 16:20:39 +01:00
Beniamino Galvani a0b2710ed9 route/link: fix parsing of 'remote' attribute for GRE links
Fixes: 57bdc4ff48

http://lists.infradead.org/pipermail/libnl/2015-November/002004.html

Signed-off-by: Beniamino Galvani <bgalvani@redhat.com>
[thaller@redhat.com: add capability to indicate bug-fix]
Signed-off-by: Thomas Haller <thaller@redhat.com>
2015-11-19 16:14:06 +01:00
David Ahern 5f044aca76 neigh: add support for NTF_SELF
http://lists.infradead.org/pipermail/libnl/2015-October/001995.html

Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
Signed-off-by: David Ahern <dsa@cumulusnetworks.com>
Signed-off-by: Thomas Haller <thaller@redhat.com>
2015-11-01 18:18:16 +01:00
David Ahern 493bbd13e6 route/vrf: add VRF support
http://lists.infradead.org/pipermail/libnl/2015-October/001991.html

Signed-off-by: David Ahern <dsa@cumulusnetworks.com>
[thaller@redhat.com: slightly modified original patch]
Signed-off-by: Thomas Haller <thaller@redhat.com>
2015-11-01 17:54:03 +01:00
Thomas Haller cef00e4f7b rtnl/link: indicate capability NL_CAPABILITY_RTNL_LINK_VLAN_PROTOCOL_SERIALZE
Related: 0aca70083e
2015-10-21 19:04:48 +02:00
Thomas Haller 7b9671c6d8 libnl-3.2.27 release
Signed-off-by: Thomas Haller <thaller@redhat.com>
2015-10-16 14:08:36 +02:00
Thomas Haller 6263a11bfc lib/attr: add nla utility functions for signed integers
Commit 7bb956501c added nla functions for
s32. We preferibly add all signed integer operations at the same time.
Thus, also add s8, s16, and s64.

Also, previously the NLA_TYPE_MAX enum was not extended to have
NLA_S32. Fix that too.

Reported-By: Jiri Pirko <jiri@resnulli.us>
Fixes: 7bb956501c
Signed-off-by: Thomas Haller <thaller@redhat.com>
2015-10-05 16:52:41 +02:00
Thomas Haller 2a8a7c31e6 route: add capability indicating the behavior of rtnl_neigh_get()
A wrong behavior for rtnl_neigh_get() was introduced between 3.2.14 and 3.2.15
(commit 64fcb47a36).

It was later fixed between 3.2.21 and 3.2.22
(commit 8571f58f23).

Add a capability NL_CAPABILITY_RTNL_NEIGH_GET_FILTER_AF_UNSPEC_FIX
to indicate that this buggy behavior was fixed.

https://bugzilla.redhat.com/show_bug.cgi?id=1261028
http://lists.infradead.org/pipermail/libnl/2015-August/001951.html
Signed-off-by: Thomas Haller <thaller@redhat.com>
2015-09-29 18:35:34 +02:00