[PATCH net] openvswitch: Add a missing break statement.

Subsystems: networking [general], openvswitch, the rest

STALE3533d REVIEWED: 2 (0M)

2 review trailers.

3 messages, 2 authors, 2016-12-20 · open the first message on its own page

[PATCH net] openvswitch: Add a missing break statement.

From: Jarno Rajahalme <hidden>
Date: 2016-12-20 01:06:51

Add a break statement to prevent fall-through from
OVS_KEY_ATTR_ETHERNET to OVS_KEY_ATTR_TUNNEL.  Without the break
actions setting ethernet addresses fail to validate with log messages
complaining about invalid tunnel attributes.

Fixes: 0a6410fbde ("openvswitch: netlink: support L3 packets")
Signed-off-by: Jarno Rajahalme <redacted>
Acked-by: Pravin B Shelar <redacted>
Acked-by: Jiri Benc <redacted>
---
 net/openvswitch/flow_netlink.c | 1 +
 1 file changed, 1 insertion(+)
diff --git a/net/openvswitch/flow_netlink.c b/net/openvswitch/flow_netlink.c
index d19044f..c87d359 100644
--- a/net/openvswitch/flow_netlink.c
+++ b/net/openvswitch/flow_netlink.c
@@ -2195,6 +2195,7 @@ static int validate_set(const struct nlattr *a,
 	case OVS_KEY_ATTR_ETHERNET:
 		if (mac_proto != MAC_PROTO_ETHERNET)
 			return -EINVAL;
+		break;
 
 	case OVS_KEY_ATTR_TUNNEL:
 		if (masked)
-- 
2.1.4

Re: [PATCH net] openvswitch: Add a missing break statement.

From: Jarno Rajahalme <hidden>
Date: 2016-12-20 01:10:10

quoted hunk
On Dec 19, 2016, at 5:06 PM, Jarno Rajahalme [off-list ref] wrote:

Add a break statement to prevent fall-through from
OVS_KEY_ATTR_ETHERNET to OVS_KEY_ATTR_TUNNEL.  Without the break
actions setting ethernet addresses fail to validate with log messages
complaining about invalid tunnel attributes.

Fixes: 0a6410fbde ("openvswitch: netlink: support L3 packets")
Signed-off-by: Jarno Rajahalme <redacted>
Acked-by: Pravin B Shelar <redacted>
Acked-by: Jiri Benc <redacted>
---
net/openvswitch/flow_netlink.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/net/openvswitch/flow_netlink.c b/net/openvswitch/flow_netlink.c
index d19044f..c87d359 100644
--- a/net/openvswitch/flow_netlink.c
+++ b/net/openvswitch/flow_netlink.c
@@ -2195,6 +2195,7 @@ static int validate_set(const struct nlattr *a,
	case OVS_KEY_ATTR_ETHERNET:
		if (mac_proto != MAC_PROTO_ETHERNET)
			return -EINVAL;
+		break;

	case OVS_KEY_ATTR_TUNNEL:
		if (masked)
-- 
2.1.4
I posted this separately from an earlier net-next patch series. Pravin agreed to pick up that rest of the series (skb->protocol w/ vlans).

  Jarno

Re: [PATCH net] openvswitch: Add a missing break statement.

From: David Miller <davem@davemloft.net>
Date: 2016-12-20 19:08:24

From: Jarno Rajahalme <redacted>
Date: Mon, 19 Dec 2016 17:06:33 -0800
Add a break statement to prevent fall-through from
OVS_KEY_ATTR_ETHERNET to OVS_KEY_ATTR_TUNNEL.  Without the break
actions setting ethernet addresses fail to validate with log messages
complaining about invalid tunnel attributes.

Fixes: 0a6410fbde ("openvswitch: netlink: support L3 packets")
Signed-off-by: Jarno Rajahalme <redacted>
Acked-by: Pravin B Shelar <redacted>
Acked-by: Jiri Benc <redacted>
Applied.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help