case MFF_IN_PORT_OXM: {
uint16_t port;
- if (ofputil_port_from_ofp11(value->be32, &port)) {
- port = OFPP_NONE;
- }
+ ofputil_port_from_ofp11(value->be32, &port);
match_set_in_port(match, port);
break;
}
case MFF_IN_PORT_OXM: {
uint16_t port;
- if (ofputil_port_from_ofp11(value->be32, &port)) {
- port = OFPP_NONE;
- }
+ ofputil_port_from_ofp11(value->be32, &port);
flow->in_port = port;
break;
}
case MFS_OFP_PORT_OXM:
if (!mask) {
uint16_t port;
- if (ofputil_port_from_ofp11(value->be32, &port)) {
- port = OFPP_NONE;
- }
+ ofputil_port_from_ofp11(value->be32, &port);
ofputil_format_port(port, s);
break;
}
/* Converts the OpenFlow 1.1+ port number 'ofp11_port' into an OpenFlow 1.0
* port number and stores the latter in '*ofp10_port', for the purpose of
* decoding OpenFlow 1.1+ protocol messages. Returns 0 if successful,
- * otherwise an OFPERR_* number.
+ * otherwise an OFPERR_* number. On error, stores OFPP_NONE in '*ofp10_port'.
*
* See the definition of OFP11_MAX for an explanation of the mapping. */
enum ofperr
*ofp10_port = ofp11_port_h - OFPP11_OFFSET;
return 0;
} else {
+ *ofp10_port = OFPP_NONE;
VLOG_WARN_RL(&bad_ofmsg_rl, "port %"PRIu32" is outside the supported "
"range 0 through %d or 0x%"PRIx32" through 0x%"PRIx32,
ofp11_port_h, OFPP_MAX - 1,