From: Florian Westphal Date: Wed, 12 Jun 2019 08:30:58 +0000 (+0200) Subject: xfrm: fix bogus WARN_ON with ipv6 X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=1be451d993170d6933c8aa5d80585595f149805f;p=linux.git 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 Fixes: 4c203b0454b ("xfrm: remove eth_proto value from xfrm_state_afinfo") Signed-off-by: Florian Westphal Signed-off-by: Steffen Klassert --- diff --git a/net/xfrm/xfrm_input.c b/net/xfrm/xfrm_input.c index 8a00cc94c32cc..6088bc2dc11e3 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) break; case AF_INET6: skb->protocol = htons(ETH_P_IPV6); + break; default: WARN_ON_ONCE(1); break;