summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/bin
diff options
context:
space:
mode:
authorChase Hiltz <me@chasehil.tz>2026-11-05 14:26:40 -0400
committerJakub Kicinski <kuba@kernel.org>2026-11-10 14:08:37 -0800
commitae89f2724db1afa96a1f1b661174fc41ae1e88fa (patch)
treeeb550e613001fafd3e8b9a05a2719edabbbfb177 /tools/perf/scripts/python/bin
parent7a3837929d049dac1f931620f30b100993ce2594 (diff)
ipv4: route: don't blackhole in-use routes when retiring fnhe routes
When a route cached in a nexthop exception (fnhe) is replaced or flushed, rt_bind_exception() and fnhe_flush_routes() call dst_dev_put() on it. That sets dst->dev to blackhole_netdev and dst->input/output to dst_discard*(), but other CPUs can still be using the route, e.g. as a noref dst taken from the fnhe under RCU. Packets that reach dst_input() or dst_output() after that are dropped. If dst_dev_put() runs after a forwarded packet has entered ip_output(), ip_skb_dst_mtu() in __ip_finish_output() can return the MTU of blackhole_netdev (68), and ip_fragment() can then drop a DF packet and send ICMP_FRAG_NEEDED with mtu 68 to its source. Commit 5018c59607a5 ("ipv4: fix race condition between route lookup and invalidation") fixed the same race in rt_cache_route() by putting the old route on the uncached list instead of calling dst_dev_put(). Do the same for routes retired from an fnhe. rt_flush_dev() still moves them to blackhole_netdev when their device is unregistered. fnhe routes are also retired on fnhe expiry (ip_del_fnhe()) and eviction (fnhe_remove_oldest()). Those paths don't bump rt_genid, so without the obsolete marking ipv4_dst_check() could still accept the route. Keep marking retired routes DST_OBSOLETE_DEAD, as dst_dev_put() did, so that users that cached them, such as sockets, look up again. In a netns reproducer that forwards IPv4 traffic over an ip6tnl device, with an fnhe for the destination, while the FIB keeps changing, this patch stops the mtu 68 ICMPs and the drops. Fixes: 95c47f9cf5e0 ("ipv4: call dst_dev_put() properly") Reviewed-by: Eric Dumazet <edumazet@kernel.org> Signed-off-by: Chase Hiltz <me@chasehil.tz> Reviewed-by: Ido Schimmel <idosch@nvidia.com> Link: https://patch.msgid.link/20261105182640.2999521-1-me@chasehil.tz Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/bin')
0 files changed, 0 insertions, 0 deletions