| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
| |
Signed-off-by: Thomas Haller <thaller@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
The -rdynamic flag is a linker flag, not a compiler/preprocessor flag,
so move it to LDFLAGS.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: Thomas Haller <thaller@redhat.com>
http://lists.infradead.org/pipermail/libnl/2016-March/002100.html
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|\
| |
| |
| |
| |
| |
| | |
http://lists.infradead.org/pipermail/libnl/2015-December/002078.html
http://lists.infradead.org/pipermail/libnl/2015-December/002083.html
Signed-off-by: Thomas Haller <thaller@redhat.com>
|
| |
| |
| |
| | |
Signed-off-by: Thomas Haller <thaller@redhat.com>
|
| |
| |
| |
| |
| |
| | |
Fixes: a09b8558148b31e469d463907d103fa78d81612c
Signed-off-by: Thomas Haller <thaller@redhat.com>
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
| |
Fixes: 6555b0d
https://github.com/thom311/libnl/pull/94
|
|\
| |
| |
| |
| |
| |
| |
| |
| | |
Add support for vlan attributes for bridges.
http://lists.infradead.org/pipermail/libnl/2015-November/002032.html
http://lists.infradead.org/pipermail/libnl/2015-November/002047.html
Signed-off-by: Thomas Haller <thaller@redhat.com>
|
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| |
| |
| | |
Taken from upstream kernel commit 6a13feb9c82803e2b815eca72fa7a9f5561d7861
(v4.3)).
Signed-off-by: Thomas Haller <thaller@redhat.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
|/
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
| |
The control message buffer is desclared in the if body
and then this buffer is used outside.
http://lists.infradead.org/pipermail/libnl/2015-November/002013.html
Signed-off-by: Andrew Vagin <avagin@virtuozzo.com>
Signed-off-by: Thomas Haller <thaller@redhat.com>
|
|\
| |
| |
| | |
http://lists.infradead.org/pipermail/libnl/2015-October/001997.html
|
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
|/
|
|
|
|
| |
Signed-off-by: Balki Raman <ramanb@cumulusnetworks.com>
Signed-off-by: David Ahern <dsa@cumulusnetworks.com>
Signed-off-by: Thomas Haller <thaller@redhat.com>
|
|
|
|
|
|
|
|
| |
Using now the macro for inet instead of inet6
Fixes: 53015f83811bd56d4b66331656633ad39051babf
https://github.com/thom311/libnl/pull/92
|
|\
| |
| |
| |
| |
| | |
http://lists.infradead.org/pipermail/libnl/2015-October/001981.html
Signed-off-by: Thomas Haller <thaller@redhat.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
|/
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
| |
Signed-off-by: Thomas Haller <thaller@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
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>
|
|\ |
|
| |
| |
| |
| | |
Related: 0aca70083e51d97d0102c73852d31625f75c942b
|
| |
| |
| |
| |
| |
| |
| | |
Fixes: 430eb4004ab7f93fd840e9836d4bc9220d3c406d
https://github.com/thom311/libnl/issues/90
https://github.com/thom311/libnl/pull/91
|
|/
|
|
|
|
|
|
|
| |
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>
|
|
|
|
| |
Signed-off-by: Thomas Haller <thaller@redhat.com>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Commit 7bb956501ccd58ed3bbffc59de996f056e178683 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: 7bb956501ccd58ed3bbffc59de996f056e178683
Signed-off-by: Thomas Haller <thaller@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A wrong behavior for rtnl_neigh_get() was introduced between 3.2.14 and 3.2.15
(commit 64fcb47a36ec12d7e7f00605f6a8952ce985dd08).
It was later fixed between 3.2.21 and 3.2.22
(commit 8571f58f23763d8db7365d02c9b27832ad3d7005).
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>
|
|
|
|
| |
Signed-off-by: Thomas Haller <thaller@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently, we try to handle MSG_CTRUNC, but if msg_controllen is zero, we make
double free for the same address.
realloc(0, 0) returns non-zero address
realloc(addr, 0) returns zero and free(addr) has already been called
Then we call free(addr) again and get an error like this:
*** Error in `./task_diag_all': double free or corruption (fasttop): 0x0000000000f9c160 ***
======= Backtrace: =========
/lib64/libc.so.6(+0x77e9d)[0x7f360ed96e9d]
/lib64/libc.so.6(+0x7f53c)[0x7f360ed9e53c]
/lib64/libc.so.6(cfree+0x4c)[0x7f360eda2e9c]
/lib64/libnl-3.so.200(nl_recv+0x221)[0x7f360f2f6361]
/lib64/libnl-3.so.200(nl_recvmsgs_report+0x555)[0x7f360f2f6a95]
/lib64/libnl-3.so.200(nl_recvmsgs+0x9)[0x7f360f2f6d89]
./task_diag_all[0x400f8d]
/lib64/libc.so.6(__libc_start_main+0xf0)[0x7f360ed3f790]
./task_diag_all[0x401169]
http://lists.infradead.org/pipermail/libnl/2015-September/001965.html
Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Thomas Haller <thaller@redhat.com>
|
|
|
|
|
|
|
|
|
| |
This enables other projects which are using Doxygen for documentation
to automatically create hyperlinks to libnl's API reference.
See: http://www.stack.nl/~dimitri/doxygen/manual/external.html
https://github.com/thom311/libnl/pull/89
|
|\
| |
| |
| |
| |
| | |
http://lists.infradead.org/pipermail/libnl/2015-September/001961.html
Signed-off-by: Thomas Haller <thaller@redhat.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When generating a port fails a few times (because they are already in used
outside of libnl's knowledge), we would back off generating a local
port and instead let kernel decide.
There was however a bug in nl_connect() that caused an assertion:
BUG at file position socket.c:147:_nl_socket_used_ports_release_all
app: socket.c:147: _nl_socket_used_ports_release_all: Assertion `0' failed.
Fixes: 96e1e5bdc2e803700055395cc3c428fa2525d1ca
|
|\
| |
| |
| |
| |
| |
| |
| | |
Fix previous patches to have link_netnsid as signed int32_t.
http://lists.infradead.org/pipermail/libnl/2015-August/001941.html
Signed-off-by: Thomas Haller <thaller@redhat.com>
|