/*
- * Copyright (c) 2011, 2012, 2013, 2014 Nicira, Inc.
+ * Copyright (c) 2011, 2012, 2013, 2014, 2015 Nicira, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
case NX_LEARN_DST_OUTPUT:
if (spec->n_bits <= 16
|| is_all_zeros(value.u8, sizeof value - 2)) {
- ovs_be16 *last_be16 = &value.be16[ARRAY_SIZE(value.be16) - 1];
- ofp_port_t port = u16_to_ofp(ntohs(*last_be16));
+ ofp_port_t port = u16_to_ofp(ntohll(value.integer));
if (ofp_to_u16(port) < ofp_to_u16(OFPP_MAX)
|| port == OFPP_IN_PORT
break;
}
}
- ofpact_pad(ofpacts);
fm->ofpacts = ofpacts->data;
fm->ofpacts_len = ofpacts->size;
err = parse_int_string(s, imm.u8, sizeof imm.u8, (char **) &s);
if (err) {
- return xasprintf("%s: bad hex digit in value", full_s);
+ return xasprintf("%s: too many bits in immediate value", full_s);
}
if (strncmp(s, "->", 2)) {
}
}
}
- ofpact_update_len(ofpacts, &learn->ofpact);
+ ofpact_finish(ofpacts, &learn->ofpact);
return NULL;
}