datapath: Fix validation of ODPAT_OUTPUT actions.
authorBen Pfaff <blp@nicira.com>
Tue, 18 Jan 2011 00:58:35 +0000 (16:58 -0800)
committerBen Pfaff <blp@nicira.com>
Tue, 18 Jan 2011 01:08:10 +0000 (17:08 -0800)
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 cdee00fd635 (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.

datapath/datapath.c

index 5e64cfb..006dc96 100644 (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))