]> git.baikalelectronics.ru Git - kernel.git/commit
xfrm: Fix pmtu discovery for local generated packets.
authorSteffen Klassert <steffen.klassert@secunet.com>
Mon, 19 Oct 2015 08:30:05 +0000 (10:30 +0200)
committerSteffen Klassert <steffen.klassert@secunet.com>
Mon, 19 Oct 2015 08:30:05 +0000 (10:30 +0200)
commit1dfcbd16859d7225b251d0527cb05c31a02c5142
tree4c40ed6e576810be7c1282e875cd132c422733f9
parentab7af7fce67d66ea15de0c471f8cdb999041c520
xfrm: Fix pmtu discovery for local generated packets.

Commit 0a654dda80d ("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: 0a654dda80de9 ("xfrm: Fix local error reporting crash with interfamily tunnels")
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
net/ipv4/xfrm4_output.c
net/ipv6/xfrm6_output.c