[ovs-dev] [PATCH] datapath: Fix wrong push/pop ethernet validation

Gregory Rose gvrose8192 at gmail.com
Wed Oct 31 14:47:06 UTC 2018


On 10/31/2018 5:35 AM, Jaime Caamaño Ruiz wrote:
> When validating push/pop ethernet actions, mac_proto is not being reset
> correctly.
>
> Signed-off-by: Jaime Caamaño Ruiz <jcaamano at suse.com>

The patch looks good Jaime, I also suggest the following tags:

Reported-at: 
https://mail.openvswitch.org/pipermail/ovs-discuss/2018-October/047554.html
Fixes: 6fcecb85ab ("datapath: add Ethernet push and pop actions")

Thanks,

- Greg

> ---
>   datapath/flow_netlink.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/datapath/flow_netlink.c b/datapath/flow_netlink.c
> index c3f1baa05..ee0c18422 100644
> --- a/datapath/flow_netlink.c
> +++ b/datapath/flow_netlink.c
> @@ -2998,7 +2998,7 @@ static int __ovs_nla_copy_actions(struct net *net, const struct nlattr *attr,
>   			 * is already present */
>   			if (mac_proto != MAC_PROTO_NONE)
>   				return -EINVAL;
> -			mac_proto = MAC_PROTO_NONE;
> +			mac_proto = MAC_PROTO_ETHERNET;
>   			break;
>   
>   		case OVS_ACTION_ATTR_POP_ETH:
> @@ -3006,7 +3006,7 @@ static int __ovs_nla_copy_actions(struct net *net, const struct nlattr *attr,
>   				return -EINVAL;
>   			if (vlan_tci & htons(VLAN_TAG_PRESENT))
>   				return -EINVAL;
> -			mac_proto = MAC_PROTO_ETHERNET;
> +			mac_proto = MAC_PROTO_NONE;
>   			break;
>   
>   		case OVS_ACTION_ATTR_PUSH_NSH:



More information about the dev mailing list