This code kept a pointer to data that might have been reallocated.
For longer term, "nested" variants of some ofpact functions
which using ofpbuf->l3 might be desirable.
Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: Ben Pfaff <blp@nicira.com>
struct ofpact_nest *on;
const union ofp_action *actions;
size_t n_actions;
- size_t start = ofpacts->size;
+ size_t start;
+ ofpact_pad(ofpacts);
+ start = ofpacts->size;
on = ofpact_put(ofpacts, OFPACT_WRITE_ACTIONS,
offsetof(struct ofpact_nest, actions));
get_actions_from_instruction(insts[OVSINST_OFPIT11_WRITE_ACTIONS],
if (error) {
goto exit;
}
+ on = ofpbuf_at_assert(ofpacts, start, sizeof *on);
on->ofpact.len = ofpacts->size - start;
}
if (insts[OVSINST_OFPIT11_WRITE_METADATA]) {