From 3b1fc5f33a533bc8399a987e2220359931cebe5c Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Mon, 17 Jan 2011 16:58:35 -0800 Subject: [PATCH] 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. --- datapath/datapath.c | 1 + 1 file changed, 1 insertion(+) diff --git a/datapath/datapath.c b/datapath/datapath.c index 5e64cfb69..006dc9634 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)) -- 2.43.0