| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
| |
This is a new option that was added in Linux v4.12.
Signed-off-by: Thomas Winter <Thomas.Winter@alliedtelesis.co.nz>
|
|
|
|
|
|
| |
This is a new option that was added in Linux v4.12.
Signed-off-by: Thomas Winter <Thomas.Winter@alliedtelesis.co.nz>
|
|
|
|
|
|
| |
This is a new option that was added in Linux v4.12.
Signed-off-by: Thomas Winter <Thomas.Winter@alliedtelesis.co.nz>
|
|
|
|
|
|
| |
This is a new option that was added in Linux v4.12.
Signed-off-by: Thomas Winter <Thomas.Winter@alliedtelesis.co.nz>
|
|
|
|
|
|
| |
This is a new option that was added in Linux v4.12.
Signed-off-by: Thomas Winter <Thomas.Winter@alliedtelesis.co.nz>
|
|
|
|
|
|
| |
This is a new option that was added in Linux v4.12.
Signed-off-by: Thomas Winter <Thomas.Winter@alliedtelesis.co.nz>
|
|
|
|
|
|
|
| |
This patch adds support for IPv6 VTI tunneling
that uses the vti6 kernel module.
Signed-off-by: Thomas Winter <Thomas.Winter@alliedtelesis.co.nz>
|
| |
|
|
|
|
|
|
|
| |
Using the flnl_* family of functions to perform FIB lookups is rather
limited. In particular, there seems to be no way of resolving the
nexthop. By hooking into RTM_GETROUTE, a regular rtnl route object is
returned instead.
|
|
|
|
| |
Signed-off-by: Jonas Johansson <jonas.johansson@westermo.se>
|
|
|
|
|
|
|
|
|
|
|
|
| |
API:
rtnl_qdisc_get_by_kind()
This function allows getting qdisc based on
its kind, i.e. tbf, htb, cbq, etc.
Signed-off-by: Volodymyr Bendiuga <volodymyr.bendiuga@westermo.se>
https://github.com/thom311/libnl/pull/244
|
|
|
|
|
|
|
| |
This patch adds support for IPv6 GRE tunneling
that uses the ip6_gre kernel module.
https://github.com/thom311/libnl/pull/255
|
|
|
|
|
| |
[thaller@redhat.com: split original patch, reword commit message
and fix symbols in "libnl-route-3.sym"]
|
|
|
|
|
|
| |
[thaller@redhat.com: adjust libnl-route-3.sym file]
https://github.com/thom311/libnl/pull/300
|
|
|
|
| |
It just looks broken to use tabs for horizontal alignment. Retab the file.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The new stat exposes IPSTATS_MIB_REASM_OVERLAPS link stat. However, the
original motivation for this change was fixing the issue with missing RX
packets link stat.
The regression was introduced in version 3.5.0 with commit 73c1d047,
that added a new enum constant IPSTATS_MIB_REASM_OVERLAPS. Without this
patch, IPSTATS_MIB_REASM_OVERLAPS is missing from
map_stat_id_from_IPSTATS_MIB_v2 and is mapped by it to 0. This tricks
inet6_parse_protinfo() into erroneously overwriting RTNL_LINK_RX_PACKETS
stat, which happens to have value 0, when it tries to set
IPSTATS_MIB_REASM_OVERLAPS.
Fixes: 73c1d0479643 ('Sync linux headers to 4.19.66')
https://github.com/thom311/libnl/pull/235
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This also fixes a few wrong SPDX license identifiers, where the original
license comment indicates GPL-2.0-only.
This is not done manually, but by running the following script:
---
#!/bin/bash
# Tool to drop license comments, adding SPDX license identifiers, while preserving
# copyright comments. The point is not to manually do this task, but perform some
# hacked up string replacement.
_cp() {
/bin/cp "$@"
}
_cat() {
/bin/cat "$@"
}
in_file() {
local T=$(mktemp)
_cp -f "$1" "$T"
_cat "$T"
rm -f "$T"
}
out_file() {
local T=$(mktemp)
_cat - > "$T"
_cp -f "$T" "$1"
rm -f "$T"
}
join() {
_cat "$@" | awk '{ printf("%s#x#", $0)}'
}
unjoin() {
_cat - | sed 's/#x#/\n/g'
}
files_all() {
git ls-files |
grep -v '\.png$' |
grep -v '^include/linux-private/'
}
adjust() {
NEWLINES='\(#x#\)\+'
COPYRIGHTS='\(\( \* Copyright (c) 20..\(-20..\|, 20..\)\? [^#]\+#x#\)\+\( \*#x# \* \(Stolen[^#]*\|Based on [^#]*\)#x#\)\?\)'
_cat - |
\
sed '1s%^\(/\* SPDX-License-Identifier: LGPL-2.1-only \*/\|\)#x#/\*#x# \* [^#]*#x# \*#x# \*[ ]\+This library is free software; you can redistribute it and/or#x# \*[ ]\+modify it under the terms of the GNU Lesser General Public#x# \*[ ]\+License as published by the Free Software Foundation version 2.1#x# \*[ ]\+of the License.#x# \*#x#'"$COPYRIGHTS"' \*/'"$NEWLINES"'%/\* SPDX-License-Identifier: LGPL-2.1-only \*/#x#/*#x#\2 */#x##x#%' |
\
sed '1s%^/\*#x# \* [^#]*#x# \*#x# \*[ ]\+This library is free software; you can redistribute it and/or#x# \*[ ]\+modify it under the terms of the GNU Lesser General Public#x# \*[ ]\+License as published by the Free Software Foundation version 2.1#x# \*[ ]\+of the License.#x# \*/'"$NEWLINES"'%/\* SPDX-License-Identifier: LGPL-2.1-only \*/#x##x#%' |
\
sed '1s%^\(\)/\*#x# \* [^#]*#x# \*#x# \*[ ]\+This library is free software; you can redistribute it and/or#x# \*[ ]\+modify it under the terms of the GNU Lesser General Public#x# \*[ ]\+License as published by the Free Software Foundation version 2.1#x# \*[ ]\+of the License.#x# \*#x#'"$COPYRIGHTS"' \*/'"$NEWLINES"'%/\* SPDX-License-Identifier: LGPL-2.1-only \*/#x#/*#x#\2 */#x##x#%' |
\
sed '1s%^\(/\* SPDX-License-Identifier: LGPL-2.1-only \*/\|\)#x#/\*#x# \* [^#]*#x# \*#x# \*[ ]\+This library is free software; you can redistribute it and/or#x# \*[ ]\+modify it under the terms of the GNU General Public License as#x# \*[ ]\+published by the Free Software Foundation version 2 of the License.#x# \*#x#'"$COPYRIGHTS"' \*/'"$NEWLINES"'%/\* SPDX-License-Identifier: GPL-2.0-only \*/#x#/*#x#\2 */#x##x#%'
}
FILES=( $(files_all) )
for f in "${FILES[@]}"; do
echo "processing \"$f\"..."
in_file "$f" | join | adjust | unjoin | out_file "$f"
done
|
|
|
|
| |
Manually make copyright comments in a consistent format.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- existing API/ABI must stay unchanged. We cannot change parameter
types. Ad most we can add new variants that support 64 bit integers.
- rtnl_tc_calc_txtime64() and rtnl_tc_calc_bufsize64() are trivial.
We should not blow up the public API of libnl for such a thing.
If the users needs it, they can just reimplement it.
- getters should return an error code. Especially if the return type
does not support encoding an error there.
- don't add separate rs_rate64/rs_ceil64 field. Instead, extend the
"rs_rate" field of "struct rtnl_ratespec" to 64 bits. It's internal
API.
|
|
|
|
|
| |
Htb class has already supported 64bit rate and ceil settings for times.
Now, in this patch, we grant this ability to libnl library.
|
|
|
|
|
|
|
|
| |
Returning the value directly as uint32_t does not leave room for an error
code. E.g. we want to indicate to the caller whether the attribute is present
or not (-NLE_NOATTR). Currenlty, the code is quite unforgiving and will just
crash/assert against invalid arguments. In theory, we could also be more forgiving
and return a error code if the link argument is invalid.
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
| |
add rtnl_link_{get,set}_slave_type functions to expose the
IFLA_INFO_SLAVE_KIND attribute.
|
|
|
|
|
|
| |
Our API is unfortunately not consistent about this.
However, in general, getters should aim to return an
error code whether the attribute could be retrieved.
|
| |
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
| |
Our API is unfortunately not consistent about this.
However, in general, getters should aim to return an
error code whether the attribute could be retrieved.
|
|
|
|
|
|
| |
This is useful when one wants to chain filters.
Signed-off-by: Volodymyr Bendiuga <volodymyr.bendiuga@westermo.se>
|
|
|
|
|
|
|
|
|
|
| |
BUG() raises an assertion. It seems overly harsh.
For example, rtnl_tc_data() can fail if we fail to allocate
memory. Asserting against that, makes libnl3 not out-of-memory
safe.
Just return a regular error.
|
| |
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
Beeing able to set NEIGH_ATTR_MASTER hash based lookups are possible for
AF_BRIDGE neighbours.
https://github.com/thom311/libnl/pull/189
|
|
|
|
|
|
|
|
| |
This function searches a class cache previously allocated with
rtnl_class_alloc_cache() and searches for a class matching the interface
index and parent qdisc.
https://github.com/thom311/libnl/pull/185
|
|
|
|
|
|
|
| |
This simple classifier allows any traffic pass through.
Useful as an example for port mirroring.
Signed-off-by: Volodymyr Bendiuga <volodymyr.bendiuga@westermo.se>
|
|
|
|
|
|
|
| |
Add support for recent fib rule features - specifying a protocol
that installed a rule and an IP protocol plus port range for rules.
Signed-off-by: David Ahern <dsa@cumulusnetworks.com>
|
|
|
|
|
| |
Public defines must have a libnl3 related prefix. Rename
GENEVE_ID_MAX to RTNL_GENEVE_ID_MAX.
|
|
|
|
| |
Signed-off-by: Wang Jian <jianjian.wang1@gmail.com>
|
|
|
|
|
|
|
|
|
| |
After rethinking, "tcm_params" doesn't seem like a good name. Change it to
"tc_params".
Also, an already released section in the linker file must never be
modified. It defeats the purpose of symbol versioning. Move the symbol
to the right section.
|
|
|
|
|
|
|
| |
It is not good to give classifier cache users only one chance to
set interface index and parent handle when allocte new cache.
Sometimes we want to reuse classifier cache to reduce the overhead
of allocating new memory everytime a new cache is created.
|
| |
|
|
|
|
|
|
|
|
|
| |
A new function rtnl_netem_set_delay_distribution_data() has been added
to allow the user to pass the delay distribution directly without loading
it from a file.
In conjunction with the maketable code (see iproute2 / NISTnet) this can
be used to generate and load custom delay distributions on the fly.
|
|
|
|
|
|
| |
Add support for MPLS lwtunnel encapsulation.
Signed-off-by: David Ahern <dsahern@gmail.com>
|
|
|
|
|
|
|
| |
Add support for RTA_TTL_PROPAGATE attribute on a per-route basis.
Used to enable/disable TTL propagation at LSP egress.
Signed-off-by: David Ahern <dsahern@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add support for route in MPLS family. New attributes:
- RTA_NEWDST - label stack for a nexthop
- RTA_VIA - nexthop address (e.g., IPv4 or IPv6)
Other changes required:
- scope has to be universe for MPLS routes so fixup rtnl_route_guess_scope
- priority attribute can not be set for MPLS. Change rtnl_route_parse to
not set the attribute by default for AF_MPLS.
- table attribute should not be set unless something other than the default
table. For MPLS this attribute can not be set.
'/' is the separator in label stacks for consistency with iproute2.
Signed-off-by: David Ahern <dsahern@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- for rtnl_rule_set_l3mdev(), also allow unsetting the l3mdev field.
In practice, kernel only allows for two options: either omit
tb[FRA_L3MDEV] or set it to 1. As such, rtnl_rule_set_l3mdev()
allows for both of these. In principle the setter could get
extended to set other values. Such values are reserved.
- for rtnl_rule_get_l3mdev() also return an error code. I think it
is appropriate to mix value and negative error code, as long as
the range of values cannot overlap with error codes.
Arguably, the outcome is a bit awkward, as the function now is
expected to return -NLE_MISSING_ATTR or 1. So, the best check
is probably
if (rtnl_rule_get_l3mdev(r) > 0) { ... }
The reason for this change is that libnl should expose the netlink
API without coercing uint8 to boolean. That way, future changes
in kernel don't require update to libnl3.
Signed-off-by: Thomas Haller <thaller@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add support for the l3mdev option in FIB rules. If l3mdev is set
then the lookup is directed to the table associated with the l3mdev
(e.g., VRF) device.
If the l3mev attribute is set the table id is not, so update the table
id attribute to make sure r_table is non-0.
iproute2 shows the rule as:
1000: from all lookup [l3mdev-table]
where [l3mdev-table] infers the dynamic nature of the table id. Keep
that notation for libnl.
Signed-off-by: David Ahern <dsahern@gmail.com>
Signed-off-by: Thomas Haller <thaller@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add support to netconf for MPLS address family.
v2
- change get method to return 0/error and take 'int *val'
which is set to the value requested
- added rtnl_netconf_get_input to libnl-route-3.sym
Signed-off-by: David Ahern <dsa@cumulusnetworks.com>
Signed-off-by: Thomas Haller <thaller@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
| |
Add accessor functions to retrieve actions on a tc object
and provide additional function to navigate the collection
of actions.
|