Skip to content
Commit 57010b8e authored by Herbert Xu's avatar Herbert Xu Committed by Steffen Klassert
Browse files

xfrm: Silence warnings triggerable by bad packets



After the elimination of inner modes, a couple of warnings that
were previously unreachable can now be triggered by malformed
inbound packets.

Fix this by:

1. Moving the setting of skb->protocol into the decap functions.
2. Returning -EINVAL when unexpected protocol is seen.

Reported-by: default avatarMaciej <Żenczykowski&lt;maze@google.com>
Fixes: 5f24f41e ("xfrm: Remove inner/outer modes from input path")
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
Reviewed-by: default avatarMaciej Żenczykowski <maze@google.com>
Signed-off-by: default avatarSteffen Klassert <steffen.klassert@secunet.com>
parent d1e0e61d
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment