{
const struct ofp_header *oh;
struct ofp13_table_features *otf;
+ struct ofpbuf properties;
unsigned int len;
memset(tf, 0, sizeof *tf);
if (len < sizeof *otf || len % 8 || len > ofpbuf_size(msg)) {
return OFPERR_OFPBPC_BAD_LEN;
}
- ofpbuf_pull(msg, sizeof *otf);
+ ofpbuf_use_const(&properties, ofpbuf_pull(msg, len), len);
+ ofpbuf_pull(&properties, sizeof *otf);
tf->table_id = otf->table_id;
if (tf->table_id == OFPTT_ALL) {
tf->miss_config = ofputil_table_miss_from_config(otf->config, oh->version);
tf->max_entries = ntohl(otf->max_entries);
- while (ofpbuf_size(msg) > 0) {
+ while (ofpbuf_size(&properties) > 0) {
struct ofpbuf payload;
enum ofperr error;
uint16_t type;
- error = pull_table_feature_property(msg, &payload, &type);
+ error = pull_table_feature_property(&properties, &payload, &type);
if (error) {
return error;
}