ofp-util: Do not assert fail if decoding malformed property.
OVS should not crash if the controller sends a malformed OpenFlow
message.  Return the error code instead.
Suggested-by: Ben Pfaff
Acked-by: Ben Pfaff
@@ -4061,7 +4061,9 @@ ofputil_decode_packet_in_private(const struct ofp_header *oh, bool loose,
uint64_t type;
error = ofpprop_pull(&continuation, &payload, &type);
- ovs_assert(!error);
+ if (error) {
+ break;
+ }
switch (type) {
case NXCPT_BRIDGE:
@@ -4124,7 +4126,7 @@ ofputil_decode_packet_in_private(const struct ofp_header *oh, bool loose,
ofputil_packet_in_private_destroy(pin);
}
- return 0;
+ return error;
}
/* Frees data in 'pin' that is dynamically allocated by
