2
0
mirror of https://github.com/openvswitch/ovs synced 2025-10-13 14:07:02 +00:00

datapath: Fix validation of ODPAT_OUTPUT actions.

The missing "break" here meant that an attempt to output to any port
number that happened to include the wrong bit would fail.

Problem introduced by commit cdee00fd63 (datapath: Replace "struct
odp_action" by Netlink attributes.)

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Jesse Gross <jess@nicira.com>
Reported-by: Michael Mao <mmao@nicira.com>
Bug #4385.
This commit is contained in:
Ben Pfaff
2011-01-17 16:58:35 -08:00
parent 84c17d988c
commit 3b1fc5f33a

View File

@@ -724,6 +724,7 @@ static int validate_actions(const struct nlattr *actions, u32 actions_len)
case ODPAT_OUTPUT:
if (nla_get_u32(a) >= DP_MAX_PORTS)
return -EINVAL;
break;
case ODPAT_SET_DL_TCI:
if (nla_get_be16(a) & htons(VLAN_CFI_MASK))