netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH ipsec-next] xfrm: fix bogus WARN_ON with ipv6
       [not found] <20190612111144.757a8cea@canb.auug.org.au>
@ 2019-06-12  8:30 ` Florian Westphal
  2019-06-17  9:20   ` Steffen Klassert
  0 siblings, 1 reply; 2+ messages in thread
From: Florian Westphal @ 2019-06-12  8:30 UTC (permalink / raw)
  To: Steffen Klassert; +Cc: netdev, Florian Westphal, Stephen Rothwell

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>
---
 net/xfrm/xfrm_input.c | 1 +
 1 file changed, 1 insertion(+)

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)
 		break;
 	case AF_INET6:
 		skb->protocol = htons(ETH_P_IPV6);
+		break;
 	default:
 		WARN_ON_ONCE(1);
 		break;
-- 
2.21.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH ipsec-next] xfrm: fix bogus WARN_ON with ipv6
  2019-06-12  8:30 ` [PATCH ipsec-next] xfrm: fix bogus WARN_ON with ipv6 Florian Westphal
@ 2019-06-17  9:20   ` Steffen Klassert
  0 siblings, 0 replies; 2+ messages in thread
From: Steffen Klassert @ 2019-06-17  9:20 UTC (permalink / raw)
  To: Florian Westphal; +Cc: netdev, Stephen Rothwell

On Wed, Jun 12, 2019 at 10:30:58AM +0200, Florian Westphal wrote:
> 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>

Applied, thanks Florian!

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-06-17  9:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20190612111144.757a8cea@canb.auug.org.au>
2019-06-12  8:30 ` [PATCH ipsec-next] xfrm: fix bogus WARN_ON with ipv6 Florian Westphal
2019-06-17  9:20   ` Steffen Klassert

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).