From: Ben Pfaff Date: Tue, 18 Jan 2011 00:58:35 +0000 (-0800) Subject: datapath: Fix validation of ODPAT_OUTPUT actions. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3b1fc5f33a533bc8399a987e2220359931cebe5c;p=openvswitch 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 cdee00fd635 (datapath: Replace "struct odp_action" by Netlink attributes.) Signed-off-by: Ben Pfaff Acked-by: Jesse Gross Reported-by: Michael Mao Bug #4385. --- diff --git a/datapath/datapath.c b/datapath/datapath.c index 5e64cfb6..006dc963 100644 --- a/datapath/datapath.c +++ b/datapath/datapath.c @@ -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))