]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
net/ip6_tunnel: Prevent perpetual tunnel growth
authorDmitry Safonov <dima@arista.com>
Thu, 9 Oct 2025 15:02:19 +0000 (16:02 +0100)
committerJakub Kicinski <kuba@kernel.org>
Tue, 14 Oct 2025 00:43:46 +0000 (17:43 -0700)
commit21f4d45eba0b2dcae5dbc9e5e0ad08735c993f16
tree4a5d6d392dd03d693a87eae2438bcde385dfc552
parente4d0c909bf8328d986bf3aadba0c33a72b5ae30d
net/ip6_tunnel: Prevent perpetual tunnel growth

Similarly to ipv4 tunnel, ipv6 version updates dev->needed_headroom, too.
While ipv4 tunnel headroom adjustment growth was limited in
commit 5ae1e9922bbd ("net: ip_tunnel: prevent perpetual headroom growth"),
ipv6 tunnel yet increases the headroom without any ceiling.

Reflect ipv4 tunnel headroom adjustment limit on ipv6 version.

Credits to Francesco Ruggeri, who was originally debugging this issue
and wrote local Arista-specific patch and a reproducer.

Fixes: 8eb30be0352d ("ipv6: Create ip6_tnl_xmit")
Cc: Florian Westphal <fw@strlen.de>
Cc: Francesco Ruggeri <fruggeri05@gmail.com>
Signed-off-by: Dmitry Safonov <dima@arista.com>
Link: https://patch.msgid.link/20251009-ip6_tunnel-headroom-v2-1-8e4dbd8f7e35@arista.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
include/net/ip_tunnels.h
net/ipv4/ip_tunnel.c
net/ipv6/ip6_tunnel.c