]> git.baikalelectronics.ru Git - kernel.git/commit
net: fix pmtu check in nopmtudisc mode
authorFlorian Westphal <fw@strlen.de>
Tue, 5 Jan 2021 23:15:22 +0000 (00:15 +0100)
committerJakub Kicinski <kuba@kernel.org>
Thu, 7 Jan 2021 22:42:36 +0000 (14:42 -0800)
commit57f2047999172dbb91c9d52749095a6e723c4d2d
treeb9ab3ccfa4122744ee8c847c774c506329e9729c
parenta2de3e31b0ad1ce1a3cc83546f80a593983a02c1
net: fix pmtu check in nopmtudisc mode

For some reason ip_tunnel insist on setting the DF bit anyway when the
inner header has the DF bit set, EVEN if the tunnel was configured with
'nopmtudisc'.

This means that the script added in the previous commit
cannot be made to work by adding the 'nopmtudisc' flag to the
ip tunnel configuration. Doing so breaks connectivity even for the
without-conntrack/netfilter scenario.

When nopmtudisc is set, the tunnel will skip the mtu check, so no
icmp error is sent to client. Then, because inner header has DF set,
the outer header gets added with DF bit set as well.

IP stack then sends an error to itself because the packet exceeds
the device MTU.

Fixes: a3fe0f108e053 ("ip_tunnels: Use skb-len to PMTU check.")
Cc: Stefano Brivio <sbrivio@redhat.com>
Signed-off-by: Florian Westphal <fw@strlen.de>
Acked-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/ipv4/ip_tunnel.c