netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net] openvswitch: Add a missing break statement.
@ 2016-12-20  1:06 Jarno Rajahalme
  2016-12-20  1:10 ` Jarno Rajahalme
  2016-12-20 19:08 ` David Miller
  0 siblings, 2 replies; 3+ messages in thread
From: Jarno Rajahalme @ 2016-12-20  1:06 UTC (permalink / raw)
  To: netdev; +Cc: jarno, jbenc, pshelar

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 <jarno@ovn.org>
Acked-by: Pravin B Shelar <pshelar@ovn.org>
Acked-by: Jiri Benc <jbenc@redhat.com>
---
 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

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

* Re: [PATCH net] openvswitch: Add a missing break statement.
  2016-12-20  1:06 [PATCH net] openvswitch: Add a missing break statement Jarno Rajahalme
@ 2016-12-20  1:10 ` Jarno Rajahalme
  2016-12-20 19:08 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: Jarno Rajahalme @ 2016-12-20  1:10 UTC (permalink / raw)
  To: Jarno Rajahalme; +Cc: netdev, jbenc, pshelar


> On Dec 19, 2016, at 5:06 PM, Jarno Rajahalme <jarno@ovn.org> 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 <jarno@ovn.org>
> Acked-by: Pravin B Shelar <pshelar@ovn.org>
> Acked-by: Jiri Benc <jbenc@redhat.com>
> ---
> 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

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

* Re: [PATCH net] openvswitch: Add a missing break statement.
  2016-12-20  1:06 [PATCH net] openvswitch: Add a missing break statement Jarno Rajahalme
  2016-12-20  1:10 ` Jarno Rajahalme
@ 2016-12-20 19:08 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2016-12-20 19:08 UTC (permalink / raw)
  To: jarno; +Cc: netdev, jbenc, pshelar

From: Jarno Rajahalme <jarno@ovn.org>
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 <jarno@ovn.org>
> Acked-by: Pravin B Shelar <pshelar@ovn.org>
> Acked-by: Jiri Benc <jbenc@redhat.com>

Applied.

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

end of thread, other threads:[~2016-12-20 19:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-12-20  1:06 [PATCH net] openvswitch: Add a missing break statement Jarno Rajahalme
2016-12-20  1:10 ` Jarno Rajahalme
2016-12-20 19:08 ` David Miller

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).