• Florian Westphal's avatar
    net: fix pmtu check in nopmtudisc mode · 50c66167
    Florian Westphal authored
    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: 23a3647b ("ip_tunnels: Use skb-len to PMTU check.")
    Cc: Stefano Brivio <sbrivio@redhat.com>
    Signed-off-by: default avatarFlorian Westphal <fw@strlen.de>
    Acked-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
    Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
    50c66167
ip_tunnel.c 29.6 KB