]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
xfrm: set ipv4 no_pmtu_disc flag only on output sa when direction is set
authorAntony Antony <antony.antony@secunet.com>
Thu, 11 Dec 2025 10:30:27 +0000 (11:30 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 23 Jan 2026 10:21:13 +0000 (11:21 +0100)
commitb7f9587f317d9faaafb1593b4e9d6b65214f8a5e
tree41061b58415e6d8f4b624fec75e914869a681126
parentdf1fae862639f518190b132e2119aa98c58ea97d
xfrm: set ipv4 no_pmtu_disc flag only on output sa when direction is set

[ Upstream commit c196def07bbc6e8306d7a274433913444b0db20a ]

The XFRM_STATE_NOPMTUDISC flag is only meaningful for output SAs, but
it was being applied regardless of the SA direction when the sysctl
ip_no_pmtu_disc is enabled. This can unintentionally affect input SAs.

Limit setting XFRM_STATE_NOPMTUDISC to output SAs when the SA direction
is configured.

Closes: https://github.com/strongswan/strongswan/issues/2946
Fixes: a4a87fa4e96c ("xfrm: Add Direction to the SA in or out")
Signed-off-by: Antony Antony <antony.antony@secunet.com>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/xfrm/xfrm_state.c