ipvs: do not mangle ICMP replies for non-first fragments
authorJulian Anastasov <ja@ssi.bg>
Wed, 22 Jul 2026 10:15:17 +0000 (13:15 +0300)
committerPablo Neira Ayuso <pablo@netfilter.org>
Thu, 23 Jul 2026 16:08:22 +0000 (18:08 +0200)
commit342e24a339b90e8e339a0f8c151ca479b8565661
treeb1961cf23f4b493effd81e264a42700d0eef21b5
parent15cab31a3730e05f0767b922a7450e5d784b2607
ipvs: do not mangle ICMP replies for non-first fragments

Sashiko warns that ip_vs_nat_icmp() unconditionally mangles the
payload for embedded non-first IPv4 fragments. The problem is
in the very old inverted pp->dont_defrag check which should not
continue when embedded is a non-first TCP/UDP/SCTP fragment.

Check for embedded non-first fragment is also missing from
ip_vs_out_icmp_v6(), it is needed before any connection
lookups that expect ports after the network headers.

Drop the blocking code from ip_vs_in_icmp_v6() which prevents
ICMPv6 from local clients to use non-MASQ forwarding.

Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Link: https://sashiko.dev/#/patchset/20260720201122.79882-1-ja%40ssi.bg
Signed-off-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
include/net/ip_vs.h
net/netfilter/ipvs/ip_vs_core.c
net/netfilter/ipvs/ip_vs_xmit.c