From: Ben Pfaff Date: Wed, 2 May 2012 21:51:51 +0000 (-0700) Subject: ofp-util: Match on NXAST_CONTROLLER as an output to OFPP_CONTROLLER. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=145fd58030ecefe8d61740d681e677521e7eff80;p=openvswitch ofp-util: Match on NXAST_CONTROLLER as an output to OFPP_CONTROLLER. Found by inspection. Signed-off-by: Ben Pfaff --- diff --git a/lib/ofp-util.c b/lib/ofp-util.c index bd078c70..501ccab2 100644 --- a/lib/ofp-util.c +++ b/lib/ofp-util.c @@ -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; }