summaryrefslogtreecommitdiffstats
path: root/lib/route
Commit message (Collapse)AuthorAgeFilesLines
* route/addr: fix handling peer addresses for IPv4 addressesThomas Haller2016-06-291-19/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For IPv4, a "normal" route has IFA_LOCAL and IFA_ADDRESS set to the same destination. An address with a explicit peer, has them differing. A peer of 0.0.0.0 is also valid and must be treated different from a normal address. unshare -n ip link add T type dummy ip link set T up ip addr add 192.168.5.10 peer 192.168.5.10/24 dev T ip addr add 192.168.5.10/24 dev T #RTNETLINK answers: File exists ip addr add 192.168.5.10 peer 192.168.6.10/24 dev T ip addr add 192.168.5.10 peer 0.0.0.0/24 dev T Previously, that would give: nl-addr-list #192.168.5.10/24 inet dev T scope global <permanent> #192.168.5.10 peer 192.168.6.10/24 inet dev T scope global <permanent> #192.168.5.10/24 inet dev T scope global <permanent> With this change, we properly get: nl-addr-list #192.168.5.10/24 inet dev T scope global <permanent> #192.168.5.10/24 peer 192.168.6.10 inet dev T scope global <permanent> #192.168.5.10/24 peer 0.0.0.0 inet dev T scope global <permanent> http://lists.infradead.org/pipermail/libnl/2016-June/002157.html Signed-off-by: Thomas Haller <thaller@redhat.com>
* route/addr: fix ID comparison for AF_INET and AF_INET6 addressesThomas Haller2016-06-291-1/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* lib/route: add macsec supportSabrina Dubroca2016-06-251-0/+786
| | | | Signed-off-by: Sabrina Dubroca <sd@queasysnail.net>
* vxlan: properly handle LOOSE_COMPARISON in ->io_compareSabrina Dubroca2016-06-251-1/+1
| | | | | | | | This lets us match links only on the attributes that have actually been set, instead of comparing all attributes. Signed-off-by: Sabrina Dubroca <sd@queasysnail.net> Signed-off-by: Thomas Haller <thaller@redhat.com>
* pass flags through ->io_compare opSabrina Dubroca2016-06-253-4/+5
| | | | | | | | | | 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>
* link: allow overwriting IFLA_EXT_MASK flag in ao_get_af() functionThomas Haller2016-06-242-10/+11
| | | | | | | 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>
* link: support RTEXT_FILTER_VFJef Oliver2016-06-241-2/+16
| | | | | | | | | | | | | | | This patch adds RTEXT_FILTER_VF mask support for SRIOV VFs. Since SRIOV VFs don't have a defined address family (ie bridge), there are no new address family specific operations defined. Exposing this mask makes rtnl_link_get_num_vfs() properly return the number of loaded SRIOV VFs. Signed-off-by: Jef Oliver <jef.oliver@intel.com> Signed-off-by: Thomas Haller <thaller@redhat.com> http://lists.infradead.org/pipermail/libnl/2016-May/002115.html http://lists.infradead.org/pipermail/libnl/2016-May/002123.html
* neigh: add function to look up neighbour (fdb) by ifindex, mac and vlanJonas Johansson2016-05-291-0/+26
| | | | | | | | | | | | | | | | | 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
* neigh: support neighbour flag NTF_SELFJonas Johansson2016-04-291-0/+2
| | | | | | | Signed-off-by: Jonas Johansson <jonas.johansson@westermo.se> Signed-off-by: Thomas Haller <thaller@redhat.com> https://github.com/thom311/libnl/pull/96
* sit: add public API for sit 6RD supportThomas Haller2016-04-151-0/+144
| | | | Signed-off-by: Thomas Haller <thaller@redhat.com>
* sit: refactor IS_SIT_LINK_ASSERT()Thomas Haller2016-04-151-53/+26
| | | | | | | | | | | Also check for NULL link and dereference link before basic error checking. Also move the declaration of the @sit member inside the macro. Obviously, the macro must now always come at first, after declaring local auto variables. Signed-off-by: Thomas Haller <thaller@redhat.com>
* sit: don't print ip6rd_prefix as integer in sit_dump_details()Thomas Haller2016-04-151-2/+2
| | | | | | | | | | | | | | First of all, inet_ntop() has no reason to fail (ever). As long as the input arguments point to valid data and family is not bogus. But when it fails, we cannot pass a 'struct in6_addr' to "%x" either, so just don't do that. Same for printing ip6rd_relay_prefix as AF_INET. If our addr-to-str method fails, we don't want to come up with something fancy. Otherwise, we'd just implement a inet_ntop() that does not fail. Signed-off-by: Thomas Haller <thaller@redhat.com>
* sit/trivial: whitespaceThomas Haller2016-04-151-4/+3
| | | | Signed-off-by: Thomas Haller <thaller@redhat.com>
* sit: add 6RD supportThadeu Lima de Souza Cascardo2016-04-151-2/+74
| | | | | | | | | Handle 6RD prefixes from sit linkinfo. Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@redhat.com> Signed-off-by: Thomas Haller <thaller@redhat.com> http://lists.infradead.org/pipermail/libnl/2016-February/002086.html
* ipgre: add support for gretap tunnelHaishuang Yan2016-04-151-5/+98
| | | | | | | | | | | | | 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
* lib: update ce-mask to uint64_tDavid Ahern2016-02-127-22/+24
| | | | | | | | | | | | | | | | | | | | 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>
* lib/route: potential memory leak in pktloc.cAmit Khatri2015-12-181-2/+4
| | | | | | | | | | | | | In scneario, where file modification time is unchanged, code is returning 0 form read_pktlocs(). It causes memory leak for path variable. Memory for this variable is allocated inside build_sysconf_path() by asprintf() function. http://lists.infradead.org/pipermail/libnl/2015-December/002079.html Signed-off-by: Amit Khatri <amit.khatri@samsung.com> Signed-off-by: Rahul Jain <rahul.jain@samsung.com> Signed-off-by: Thomas Haller <thaller@redhat.com>
* route/link: add support for IN6_ADDR_GEN_MODE_STABLE_PRIVACYQuentin Armitage2015-12-181-0/+1
| | | | | | | | | IN6_ADDR_GEN_MODE_STABLE_PRIVACY was introduced in Linux 4.1 https://github.com/thom311/libnl/pull/95 Signed-off-by: Quentin Armitage <quentin@armitage.org.uk> Signed-off-by: Thomas Haller <thaller@redhat.com>
* route/link: handle RTEXT_FILTER_BRVLAN_COMPRESSEDTobias Jungel2015-12-071-9/+28
| | | | | | | notifications from the kernel regarding vlan ids are now handled [thaller@redhat.com: split ao_parse_af_full() to previous patch] Signed-off-by: Thomas Haller <thaller@redhat.com>
* bridge: add support for VLANsDavid Ahern2015-12-072-2/+206
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* lib: handle family-based parsing of IFLA_AF_SPEC attributeDavid Ahern2015-12-071-13/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* link: add AF operation to append attributes to a GETLINK messageDavid Ahern2015-12-071-1/+25
| | | | | | | | | | | 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>
* route/link/vxlan: add support for link_info compareDavid Ahern2015-11-201-0/+29
| | | | | | | 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>
* route/link/vxlan: trivial rename VXLAN_HAS_ prefix and vxi_maskDavid Ahern2015-11-201-102/+102
| | | | | | | | | | | Global search and replace of VXLAN_HAS_ for VXLAN_ATTR_ and vxi_mask for ce_mask. Preparation step for using ATTR_DIFF infrastructure in a vxlan_compare. Signed-off-by: Balki Raman <ramanb@cumulusnetworks.com> Signed-off-by: David Ahern <dsa@cumulusnetworks.com> [thaller@redhat.com: rebased patch and changed whitespace] Signed-off-by: Thomas Haller <thaller@redhat.com>
* route/link: add link info compare operationDavid Ahern2015-11-202-0/+23
| | | | | | Signed-off-by: Balki Raman <ramanb@cumulusnetworks.com> Signed-off-by: David Ahern <dsa@cumulusnetworks.com> Signed-off-by: Thomas Haller <thaller@redhat.com>
* route/link: corrected array size for inet_policyTobias Jungel2015-11-191-1/+1
| | | | | | | | Using now the macro for inet instead of inet6 Fixes: 53015f83811bd56d4b66331656633ad39051babf https://github.com/thom311/libnl/pull/92
* route/link: add ipv6 support to vxlan linksBeniamino Galvani2015-11-191-21/+78
| | | | | | | | Extend vxlan links to support the IFLA_VXLAN_GROUP6 and IFLA_VXLAN_LOCAL6 attributes used to represent IPv6 endpoints. Signed-off-by: Beniamino Galvani <bgalvani@redhat.com> Signed-off-by: Thomas Haller <thaller@redhat.com>
* route/link: fix dump of parent link for some link typesBeniamino Galvani2015-11-197-6/+53
| | | | | | | | 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>
* route/link: add macvtap supportBeniamino Galvani2015-11-191-12/+189
| | | | | | | | | 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>
* link/neigh: add flags option to link and neighbor cachesDavid Ahern2015-11-192-2/+69
| | | | | | | | | | | | | 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>
* route/vlan: allow clearing vlan ingress mapThomas Haller2015-11-191-2/+16
| | | | | | | | | | | | | | | | | | | | | 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>
* route/link: fix parsing of 'remote' attribute for GRE linksBeniamino Galvani2015-11-191-2/+2
| | | | | | | | | | Fixes: 57bdc4ff4895dd91cc723d22eecadcf48945e87c 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>
* neigh: add support for NTF_SELFDavid Ahern2015-11-011-6/+13
| | | | | | | | 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>
* route/vrf: add VRF supportDavid Ahern2015-11-011-0/+263
| | | | | | | | 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>
* route/link: IFLA_VLAN_PROTOCOL added to vlan_put_attrsskuklinski2015-10-211-0/+3
| | | | | | | Fixes: 430eb4004ab7f93fd840e9836d4bc9220d3c406d https://github.com/thom311/libnl/issues/90 https://github.com/thom311/libnl/pull/91
* rtnl/link: document vlan-protocol to be exposed in network-byte orderThomas Haller2015-10-211-3/+5
| | | | | | | | | Unfortunately this was done wrong. Instead of fixing it now (and change behavior), document the behavior. Fixes: 430eb4004ab7f93fd840e9836d4bc9220d3c406d Signed-off-by: Thomas Haller <thaller@redhat.com>
* route/link: add missing newlines after debug messagesBeniamino Galvani2015-10-0511-11/+11
| | | | | | | http://lists.infradead.org/pipermail/libnl/2015-October/001977.html Signed-off-by: Beniamino Galvani <bgalvani@redhat.com> Signed-off-by: Thomas Haller <thaller@redhat.com>
* vlan: add MVRP VLAN flagJiří Klimeš2015-09-031-0/+1
| | | | | | | | Kernel patch: http://patchwork.ozlabs.org/patch/219040/ iproute2 patch: http://patchwork.ozlabs.org/patch/219364/ Signed-off-by: Jiří Klimeš <jklimes@redhat.com> Signed-off-by: Thomas Haller <thaller@redhat.com>
* vlan: add VLAN flags to trans_tbl to print them properlyJiří Klimeš2015-09-031-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | nl-link-list only showed reorder_hdr. $ ip -d link show dev em1.444 28: em1.444@em1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DEFAULT group default link/ether 3c:97:0e:58:1d:c1 brd ff:ff:ff:ff:ff:ff promiscuity 0 vlan protocol 802.1Q id 444 <REORDER_HDR,GVRP,LOOSE_BINDING> ingress-qos-map { 1:3 4:2 } egress-qos-map { 2:6 9:5 } $ /usr/sbin/nl-link-list --details -i 28 em1.444 ether 3c:97:0e:18:2e:a1 <broadcast,multicast,up,running,lowerup> slave-of em1 group 0 vlan-id 444 mtu 1500 txqlen 0 weight 0 qdisc noqueue index 28 txq 1 rxq 1 brd ff:ff:ff:ff:ff:ff state up mode default carrier up vlan-info id 444 <reorder_hdr,> vlan protocol <129> ingress vlan prio -> qos/socket prio mapping: 1 -> 0x000003, 4 -> 0x000002, egress qos/socket prio -> vlan prio mapping: 0x000002 -> 6, 0x000009 -> 5, ... Signed-off-by: Jiří Klimeš <jklimes@redhat.com> Signed-off-by: Thomas Haller <thaller@redhat.com>
* route/link: add missing link_attrs translationsTobias Klauser2015-08-311-0/+3
| | | | | | | | | | | | Add LINK_ATTR_NSFD, LINK_ATTR_NS_PID and LINK_ATTR_LINK_NETNSID to the link_attrs translation table after they were added in commits 760bfabad8cd ("add link netns support") and 66aab65595fb ("route/link: add support for IFLA_LINK_NETNSID") respectively. http://lists.infradead.org/pipermail/libnl/2015-August/001959.html Signed-off-by: Tobias Klauser <tklauser@distanz.ch> Signed-off-by: Thomas Haller <thaller@redhat.com>
* route/link: make link_netnsid argument (signed) int32_tThomas Haller2015-08-171-5/+5
| | | | | | Fixes: 66aab65595fb20bf166936fcfa4c8568b58f7f68 Signed-off-by: Thomas Haller <thaller@redhat.com>
* route/link: add support for IFLA_LINK_NETNSIDThomas Haller2015-08-171-1/+48
| | | | Signed-off-by: Thomas Haller <thaller@redhat.com>
* route/link: Remove unnecessary NULL check before release_link_info()Tobias Klauser2015-08-141-6/+2
| | | | | | | | | | | release_link_info() already check whether link->l_info_ops is not NULL before accessing it, thus there is no need to do the same before calling it. http://lists.infradead.org/pipermail/libnl/2015-July/001929.html Signed-off-by: Tobias Klauser <tklauser@distanz.ch> Signed-off-by: Thomas Haller <thaller@redhat.com>
* route/qdisc: fixe printing whitespace in qdisc_dump_details()Steffen Vogel2015-08-142-4/+4
| | | | | | And whitespace (source code) fix. Signed-off-by: Thomas Haller <thaller@redhat.com>
* route/tc: use plain format string in rtnl_tc_dump_stats()Thomas Haller2015-08-141-8/+11
| | | | Signed-off-by: Thomas Haller <thaller@redhat.com>
* route/tc: improved statistics dump (just alignment)Steffen Vogel2015-08-141-18/+9
| | | | | | | | 9 digits for for B/s don't make sense to me. It's just breaks the alignment. [thaller@redhat.com: whitespace fixes] Signed-off-by: Thomas Haller <thaller@redhat.com>
* route/qdisc: added more attributes to netem dumpSteffen Vogel2015-08-141-2/+60
| | | | | | | | I added all the netem attributes (except for limit) to the NL_DUMP_DETAILS section. [thaller@redhat.com: whitespace fixes] Signed-off-by: Thomas Haller <thaller@redhat.com>
* ipvlan: fix return error code for rtnl_link_ipvlan_get_mode()Thomas Haller2015-07-101-1/+1
| | | | | | | rtnl_link_ipvlan_get_mode() was just introduced as new API. Fix the error code to return -NLE_INVAL instead of -NLE_OPNOTSUPP. http://lists.infradead.org/pipermail/libnl/2015-June/001921.html
* link: set ifi_change in link messagematben22015-07-091-0/+1
| | | | | | | | | | | The ifi_change field can be set with the mask of the flags that need to be changed as part of the link message to the kernel. This means only the specific flags that have been changed will be modified in the kernel, rather than the entire flags entry. [thaller@redhat.com: add capability to indicate the change in behavior] https://github.com/thom311/libnl/pull/86
* ipvlan: don't check for valid @mode argument in rtnl_link_ipvlan_set_mode()Thomas Haller2015-06-261-3/+0
| | | | | | | | | | | | | | | | | In the future kernel might support more modes. Don't be so strict in rtnl_link_ipvlan_set_mode() and accept any uint16 mode. This way when adding new modes, rtnl_link_ipvlan_set_mode() does not need to be changed. If the user passes an invalid value and sends a message to the kernel, it will be rejected there. http://lists.infradead.org/pipermail/libnl/2015-June/001902.html Fixes: 7de5be85bf9aa3eb9f022e4813226135e89adec2 Signed-off-by: Thomas Haller <thaller@redhat.com>