• Steffen Klassert's avatar
    xfrm: Fix pmtu discovery for local generated packets. · ca064bd8
    Steffen Klassert authored
    Commit 044a832a ("xfrm: Fix local error reporting crash
    with interfamily tunnels") moved the setting of skb->protocol
    behind the last access of the inner mode family to fix an
    interfamily crash. Unfortunately now skb->protocol might not
    be set at all, so we fail dispatch to the inner address family.
    As a reault, the local error handler is not called and the
    mtu value is not reported back to userspace.
    
    We fix this by setting skb->protocol on message size errors
    before we call xfrm_local_error.
    
    Fixes: 044a832a ("xfrm: Fix local error reporting crash with interfamily tunnels")
    Signed-off-by: default avatarSteffen Klassert <steffen.klassert@secunet.com>
    ca064bd8
xfrm4_output.c 2.53 KB