summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Pettit <jpettit@nicira.com>2009-01-14 14:52:59 -0800
committerJustin Pettit <jpettit@nicira.com>2009-01-14 15:19:12 -0800
commit83090c3ae07f97af5d3ede3629d7c33e45545048 (patch)
tree22fa740b8de06223d671321ed50aeb73f4842224
parent2e24b5fdefd892579657135f7e3eff2fc4abce50 (diff)
downloadopenvswitch-83090c3ae07f97af5d3ede3629d7c33e45545048.tar.gz
Check wildcards for in_port != out_port output validation.
OpenFlow requires that traffic that is to be sent out the interface it came in on use the OFPP_IN_PORT virtual port. The action validation code that enforces this ignored the wildcards field, which meant it was using the garbage 'in_port' value for this check. (cherry picked from commit 1b580f69f3dfacee49532f71abd72755a09eabd4)
-rw-r--r--datapath/dp_act.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/datapath/dp_act.c b/datapath/dp_act.c
index c41a32993..4c27c8596 100644
--- a/datapath/dp_act.c
+++ b/datapath/dp_act.c
@@ -26,7 +26,8 @@ validate_output(struct datapath *dp, const struct sw_flow_key *key,
{
struct ofp_action_output *oa = (struct ofp_action_output *)ah;
- if (oa->port == htons(OFPP_NONE) || oa->port == key->in_port)
+ if (oa->port == htons(OFPP_NONE) ||
+ (!(key->wildcards & OFPFW_IN_PORT) && oa->port == key->in_port))
return OFPBAC_BAD_OUT_PORT;
return ACT_VALIDATION_OK;