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.
{
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;