Skip to content
Commit 044a832a authored by Steffen Klassert's avatar Steffen Klassert
Browse files

xfrm: Fix local error reporting crash with interfamily tunnels



We set the outer mode protocol too early. As a result, the
local error handler might dispatch to the wrong address family
and report the error to a wrong socket type. We fix this by
setting the outer protocol to the skb after we accessed the
inner mode for the last time, right before we do the atcual
encapsulation where we switch finally to the outer mode.

Reported-by: default avatarChris Ruehl <chris.ruehl@gtsys.com.hk>
Tested-by: default avatarChris Ruehl <chris.ruehl@gtsys.com.hk>
Signed-off-by: default avatarSteffen Klassert <steffen.klassert@secunet.com>
parent cd3bafc7
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment