/*
- * Copyright (c) 2010, 2011, 2012, 2013 Nicira, Inc.
+ * Copyright (c) 2010, 2011, 2012, 2013, 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.
}
ofpbuf_put(ofpacts, &byte, 1);
- note = ofpacts->l2;
+ note = ofpacts->frame;
note->length++;
arg += 2;
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);
}
uint16_t id = atoi(cntr);
ofpbuf_put(b, &id, sizeof id);
- ids = b->l2;
+ ids = b->frame;
ids->n_controllers++;
}
if (!ids->n_controllers) {
} 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;
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;
char *error;
if (*n_gms >= allocated_gms) {
+ struct ofputil_group_mod *new_gms;
size_t i;
- *gms = x2nrealloc(*gms, &allocated_gms, sizeof **gms);
+ new_gms = x2nrealloc(*gms, &allocated_gms, sizeof **gms);
for (i = 0; i < *n_gms; i++) {
- list_moved(&(*gms)[i].buckets);
+ list_moved(&new_gms[i].buckets, &(*gms)[i].buckets);
}
+ *gms = new_gms;
}
error = parse_ofp_group_mod_str(&(*gms)[*n_gms], command, ds_cstr(&s),
&usable);