X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=lib%2Fofp-parse.c;h=c759f036b7bab05f6dd7e08aeef57f47bb15e8f0;hb=dc723c447a797e555d400594133a35b9841eb1de;hp=e100974c0f5fdc306f0b7f4517810c6532e8f1c0;hpb=1f317cb5c2aa446c4b0252634a4a70dcc3682f93;p=sliver-openvswitch.git diff --git a/lib/ofp-parse.c b/lib/ofp-parse.c index e100974c0..c759f036b 100644 --- a/lib/ofp-parse.c +++ b/lib/ofp-parse.c @@ -291,7 +291,7 @@ parse_note(const char *arg, struct ofpbuf *ofpacts) } ofpbuf_put(ofpacts, &byte, 1); - note = ofpacts->l2; + note = ofpacts->frame; note->length++; arg += 2; @@ -400,7 +400,7 @@ parse_noargs_dec_ttl(struct ofpbuf *b) ids = ofpact_put_DEC_TTL(b); ofpbuf_put(b, &id, sizeof id); - ids = b->l2; + ids = b->frame; ids->n_controllers++; ofpact_update_len(b, &ids->ofpact); } @@ -426,7 +426,7 @@ parse_dec_ttl(struct ofpbuf *b, char *arg) uint16_t id = atoi(cntr); ofpbuf_put(b, &id, sizeof id); - ids = b->l2; + ids = b->frame; ids->n_controllers++; } if (!ids->n_controllers) { @@ -1326,6 +1326,9 @@ parse_ofp_str__(struct ofputil_flow_mod *fm, int command, char *string, } else if (fields & F_FLAGS && !strcmp(name, "no_byte_counts")) { fm->flags |= OFPUTIL_FF_NO_BYT_COUNTS; *usable_protocols &= OFPUTIL_P_OF13_UP; + } else if (!strcmp(name, "no_readonly_table") + || !strcmp(name, "allow_hidden_fields")) { + /* ignore these fields. */ } else { char *value; @@ -1921,7 +1924,7 @@ parse_ofp_flow_mod_file(const char *file_name, uint16_t command, size_t i; for (i = 0; i < *n_fms; i++) { - free((*fms)[i].ofpacts); + free(CONST_CAST(struct ofpact *, (*fms)[i].ofpacts)); } free(*fms); *fms = NULL;