From: Demos Ra The kernel sends RTM_NEWNEXTHOPBUCKET to RTNLGRP_NEXTHOP when the upkeep of a resilient nexthop group migrates a bucket. With newnexthopbucket-ntf excluded from the code generation, the notification table of the generated rt-nexthop code ends at RTM_DELNEXTHOP. On a socket subscribed to the group, ynl_ntf_parse() rejects the bucket notification without setting an error message, so ynl_ntf_check() fails, and so does a request in flight when the notification arrives, as ynl_check_alien() passes it to ynl_ntf_parse() too. ynl-gen can now generate the notification, so drop the exclusion. Reproduced in a network namespace, with traffic through a resilient group so that a weight change defers the bucket migrations to the upkeep work: ip link add dummy0 type dummy && ip link set dummy0 up ip addr add 192.0.2.1/24 dev dummy0 ip nexthop add id 1 via 192.0.2.2 dev dummy0 ip nexthop add id 2 via 192.0.2.3 dev dummy0 ip nexthop add id 10 group 1/2 type resilient buckets 8 idle_timer 1 ip route add 198.51.100.0/24 nhid 10 for i in $(seq 64); do echo > /dev/udp/198.51.100.$i/9; done ip nexthop replace id 10 group 1,3/2 type resilient A C program that joins RTNLGRP_NEXTHOP by hand and then calls ynl_ntf_check() or rt_nexthop_getnexthop() fails with an empty error message before this patch, and parses the two bucket notifications after it. The program is available on request. Reproducing it needed no kernel changes. Tested on 7.0 with the reproducer and the YNL selftests, which all pass. Fixes: 457dc9fefe9a ("netlink: specs: Add a spec for nexthops in rtnetlink") Reported-by: Sashiko Closes: https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261019-rt-nexthop-spec-v1-1-9c586edf86ab%40gmail.com Signed-off-by: Demos Ra --- tools/net/ynl/generated/Makefile | 1 - 1 file changed, 1 deletion(-) diff --git a/tools/net/ynl/generated/Makefile b/tools/net/ynl/generated/Makefile index d76d4ca94629..5a186349b5a8 100644 --- a/tools/net/ynl/generated/Makefile +++ b/tools/net/ynl/generated/Makefile @@ -18,7 +18,6 @@ include ../Makefile.deps YNL_GEN_ARG_ethtool:=--user-header linux/ethtool_netlink.h \ --exclude-op stats-get -YNL_GEN_ARG_rt-nexthop:=--exclude-op newnexthopbucket-ntf TOOL:=../pyynl/ynl_gen_c.py TOOL_RST:=../pyynl/ynl_gen_rst.py -- 2.53.0