if (error) {
return error;
}
+ if (oh->version >= OFP13_VERSION && ofpmsg_is_stat_request(oh)
+ && ofpmp_more(oh)) {
+ /* We have no buffer implementation for multipart requests.
+ * Report overflow for requests which consists of multiple
+ * messages. */
+ return OFPERR_OFPBRC_MULTIPART_BUFFER_OVERFLOW;
+ }
switch (type) {
/* OpenFlow requests. */
/* FIXME: Change the following once they are implemented: */
case OFPTYPE_QUEUE_GET_CONFIG_REQUEST:
case OFPTYPE_TABLE_FEATURES_STATS_REQUEST:
- return OFPERR_OFPBRC_BAD_TYPE;
+ /* fallthrough */
case OFPTYPE_HELLO:
case OFPTYPE_ERROR:
case OFPTYPE_METER_FEATURES_STATS_REPLY:
case OFPTYPE_TABLE_FEATURES_STATS_REPLY:
default:
- return OFPERR_OFPBRC_BAD_TYPE;
+ if (ofpmsg_is_stat_request(oh)) {
+ return OFPERR_OFPBRC_BAD_STAT;
+ } else {
+ return OFPERR_OFPBRC_BAD_TYPE;
+ }
}
}