Skip to contentSkip to conversation

xfrm: fix bogus WARN_ON with ipv6

PATCH Applied Florian Westphal 2 participants 2 messages Jun 12, 2019 – Jun 17, 2019 1 message not in the archive

Subsystems (3)
lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

PATCH 1/1 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().

Fixes 4c203b0454b ("xfrm: remove eth_proto value from xfrm_state_afinfo")
---
 net/xfrm/xfrm_input.c | 1 +
 1 file changed, 1 insertion(+)
net/xfrm/xfrm_input.c +1 -0
index 8a00cc94c32c..6088bc2dc11e 100644
@@ -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;
Signature · 1 line
2.21.0