2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-31 06:15:47 +00:00

ofp-parse: Check port number only after parsing it in parse_output().

This patch allows to set max_len to UINT16_MAX in parse_output
if output port is OFPP_CONTROLLER.

Signed-off-by: Daisuke Kotani <kotani@net.ist.i.kyoto-u.ac.jp>
Signed-off-by: Ben Pfaff <blp@nicira.com>
This commit is contained in:
Daisuke Kotani
2013-12-23 18:19:48 +09:00
committed by Ben Pfaff
parent cde1c287b1
commit 2918176868

View File

@@ -212,10 +212,10 @@ parse_output(const char *arg, struct ofpbuf *ofpacts)
struct ofpact_output *output;
output = ofpact_put_OUTPUT(ofpacts);
output->max_len = output->port == OFPP_CONTROLLER ? UINT16_MAX : 0;
if (!ofputil_port_from_string(arg, &output->port)) {
return xasprintf("%s: output to unknown port", arg);
}
output->max_len = output->port == OFPP_CONTROLLER ? UINT16_MAX : 0;
return NULL;
}
}