diff options
author | Florian Westphal <fw@strlen.de> | 2019-06-12 04:30:58 -0400 |
---|---|---|
committer | Steffen Klassert <steffen.klassert@secunet.com> | 2019-06-12 05:01:56 -0400 |
commit | 1be451d993170d6933c8aa5d80585595f149805f (patch) | |
tree | 8c5fae04582930c180bc9373d18b54c96c97339e | |
parent | 4f518e802ccad30c9dccc895f2294398757b87c0 (diff) |
xfrm: fix bogus WARN_ON with ipv6
net/xfrm/xfrm_input.c:378:17: warning: this statement may fall through [-Wimplicit-fallthrough=]
skb->protocol = htons(ETH_P_IPV6);
... the fallthrough then causes a bogus WARN_ON().
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Fixes: 4c203b0454b ("xfrm: remove eth_proto value from xfrm_state_afinfo")
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
-rw-r--r-- | net/xfrm/xfrm_input.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/net/xfrm/xfrm_input.c b/net/xfrm/xfrm_input.c index 8a00cc94c32c..6088bc2dc11e 100644 --- a/net/xfrm/xfrm_input.c +++ b/net/xfrm/xfrm_input.c | |||
@@ -376,6 +376,7 @@ static int xfrm_prepare_input(struct xfrm_state *x, struct sk_buff *skb) | |||
376 | break; | 376 | break; |
377 | case AF_INET6: | 377 | case AF_INET6: |
378 | skb->protocol = htons(ETH_P_IPV6); | 378 | skb->protocol = htons(ETH_P_IPV6); |
379 | break; | ||
379 | default: | 380 | default: |
380 | WARN_ON_ONCE(1); | 381 | WARN_ON_ONCE(1); |
381 | break; | 382 | break; |