1
0
Fork 0
mirror of https://github.com/thom311/libnl.git synced 2026-03-07 02:20:28 +00:00
Netlink Library Suite
Find a file
Jonas Gorski 655a638d4e route: treat nhid changes as full route replacements
When updating a route targeting a nexthoup group with id changing its
nexthop to a single nexthop, we treat this as an update and instead
add that nexthop to the group instead of replacing the route in the
cache.

So e.g. with

nexthop id 10 fe80::1 dev eth1
nexthop id 11 fe80::2 dev eth2
nexthop id 12 fe80::3 dev eth3
nexthop id 20 grp 10/11

adding a route
dst 2001:db8:1:/64 nhid 20

libnl will store this as 2001:db8:1:/64 via fe80::1, fe80::2

if we now update the route with

dst 2001:db8:1:/64 nhid 12

libnl will see a new route with a single nexthop. Since the existing
route for dst 2001:db8:1:/64 is a multipath route, and the new route has
a single nexthop, libnl assumes this is a new nexthop for the route, and
merges it to 2001:db8:1:/64 via fe80::1, fe80::2, fe80::3 instead of
replacing it.

Fix this by checking the nhid of the routes, and only merge if they
match.

Fixes: 29b71371e7 ("route cache: Fix handling of ipv6 multipath routes")
Signed-off-by: Jonas Gorski <jonas.gorski@bisdn.de>

https://github.com/thom311/libnl/pull/449
2025-12-23 21:50:53 +01:00
.github/workflows github: add test that all linux headers are copied 2025-12-11 22:56:06 +01:00
doc libnl-3.11.0 release 2025-12-04 21:57:38 +01:00
etc pktloc: fix typo for tcp.flag.syn 2015-02-17 15:26:15 +01:00
include include/linux: include linux header "ila.h" 2025-12-11 22:37:37 +01:00
lib route: treat nhid changes as full route replacements 2025-12-23 21:50:53 +01:00
m4 gitignore: merge all gitignore files in top level directory 2020-04-16 16:22:44 +02:00
man build: merge man/Makefile.am into top-level makefile 2017-02-27 13:20:34 +01:00
python python: fix flake8 warnings 2024-07-19 11:33:07 +02:00
src cls: avoid explicit free in nl_cli_cls_parse_ematch() 2025-01-12 09:52:58 +01:00
tests tests: skip various tests when kernel returns EOPNOTSUPP (NLE_OPNOTSUPP) 2025-12-23 21:46:22 +01:00
third_party/c-list c-list: merge commit '8c56bfb8c0' as 'third_party/c-list' 2024-11-14 12:05:07 +01:00
tools tools: update default GPG_USER in "build_release.sh" script 2025-12-04 21:38:41 +01:00
.clang-format clang-format: update ".clang-format" from linux kernel 2023-08-17 09:19:29 +02:00
.flake8 python: add ".flake8" file for configuring "flake8" 2023-07-25 16:10:27 +02:00
.git-blame-ignore-revs clang-format: ignore reformatting commit in ".git-blame-ignore-revs" 2023-08-17 09:22:25 +02:00
.gitignore [ip6tnl] Remove tests/test-create-ip6tnl.c 2025-08-04 08:26:57 +02:00
.indent.pro style: add .indent.pro file for GNU indent 2014-07-27 10:57:36 +02:00
autogen.sh build: ensure "autogen.sh" scripts fail on error 2023-07-24 18:19:50 +02:00
ChangeLog changelog: update URL to git history 2022-07-06 14:00:38 +02:00
configure.ac libnl-3.11.0 release 2025-12-04 21:57:38 +01:00
COPYING Update COPYING to fix FSF address 2012-01-17 12:38:37 +01:00
libnl-3.0.pc.in build: add Libs.private field in libnl pkg-config file 2022-03-10 11:07:39 +01:00
libnl-3.sym cache: add nl_cache_resync_v2() 2025-02-05 17:18:23 +01:00
libnl-cli-3.0.pc.in Add libnl-cli-3.0 to pkg-config tool 2011-10-10 11:39:24 +02:00
libnl-cli-3.sym cli: add nl-nh-list utility 2023-07-31 15:11:28 +02:00
libnl-genl-3.0.pc.in Switch to libtool versioning system 2011-09-13 22:58:08 +02:00
libnl-genl-3.sym build: add comments to linker version scripts about the version tags 2022-08-24 12:45:46 +02:00
libnl-idiag-3.0.pc.in Add support for inet diag Netlink protocol. 2013-07-19 02:06:21 -07:00
libnl-idiag-3.sym build: add comments to linker version scripts about the version tags 2022-08-24 12:45:46 +02:00
libnl-nf-3.0.pc.in Switch to libtool versioning system 2011-09-13 22:58:08 +02:00
libnl-nf-3.sym build: add comments to linker version scripts about the version tags 2022-08-24 12:45:46 +02:00
libnl-route-3.0.pc.in Switch to libtool versioning system 2011-09-13 22:58:08 +02:00
libnl-route-3.sym ila-encap: Add support for ILA nexthop encapsulation 2025-10-01 16:16:04 -07:00
libnl-xfrm-3.0.pc.in xfrm: add xfrm support 2014-07-20 18:14:46 +02:00
libnl-xfrm-3.sym xfrm: Add support for xfrm interface ID 2024-11-26 19:57:29 +01:00
Makefile.am include/linux: include linux header "ila.h" 2025-12-11 22:37:37 +01:00
pyproject.toml black: fix "target-version" in "pyproject.toml" 2024-09-12 09:22:50 +02:00