Skip to content
Commit 0a371ed6 authored by Herbert Xu's avatar Herbert Xu Committed by Greg Kroah-Hartman
Browse files

xfrm: Silence warnings triggerable by bad packets

commit 57010b8e

 upstream.

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>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent cf3c8916
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