[ovs-dev] [PATCH 1/2] datapath: Fix validation of ODPAT_OUTPUT actions.

Ben Pfaff blp at nicira.com
Tue Jan 18 00:59:46 UTC 2011


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 at nicira.com>
Reported-by: Michael Mao <mmao at nicira.com>
Bug #4385.
---
 datapath/datapath.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/datapath/datapath.c b/datapath/datapath.c
index 5e64cfb..006dc96 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))
-- 
1.7.1





More information about the dev mailing list