xfrm: interface: fix ipv4 pmtu check to honor ip header df
authorEyal Birger <eyal.birger@gmail.com>
Sat, 20 Feb 2021 13:01:15 +0000 (15:01 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 14 Apr 2021 06:42:05 +0000 (08:42 +0200)
commit3b74ce529ece253fb70efa69548ef8e160fb6b2d
treea024d1147c62da13abf62dbab3e8bac6809dccac
parent2d62d6980c2bbb3346c5345d9a5a30953cc56700
xfrm: interface: fix ipv4 pmtu check to honor ip header df

[ Upstream commit 8fc0e3b6a8666d656923d214e4dc791e9a17164a ]

Frag needed should only be sent if the header enables DF.

This fix allows packets larger than MTU to pass the xfrm interface
and be fragmented after encapsulation, aligning behavior with
non-interface xfrm.

Fixes: f203b76d7809 ("xfrm: Add virtual xfrm interfaces")
Signed-off-by: Eyal Birger <eyal.birger@gmail.com>
Reviewed-by: Sabrina Dubroca <sd@queasysnail.net>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/xfrm/xfrm_interface.c