2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-31 14:25:26 +00:00

ofp-util: Match on NXAST_CONTROLLER as an output to OFPP_CONTROLLER.

Found by inspection.

Signed-off-by: Ben Pfaff <blp@nicira.com>
This commit is contained in:
Ben Pfaff
2012-05-02 14:51:51 -07:00
parent 33f1e7576f
commit 145fd58030

View File

@@ -3761,11 +3761,13 @@ ofputil_put_action(enum ofputil_action_code code, struct ofpbuf *buf)
bool
action_outputs_to_port(const union ofp_action *action, ovs_be16 port)
{
switch (ntohs(action->type)) {
case OFPAT10_OUTPUT:
switch (ofputil_decode_action(action)) {
case OFPUTIL_OFPAT10_OUTPUT:
return action->output.port == port;
case OFPAT10_ENQUEUE:
case OFPUTIL_OFPAT10_ENQUEUE:
return ((const struct ofp_action_enqueue *) action)->port == port;
case OFPUTIL_NXAST_CONTROLLER:
return port == htons(OFPP_CONTROLLER);
default:
return false;
}