X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=utilities%2Fovs-ofctl.c;h=665a2c7a658e318175048912bd10e75eae279960;hb=44528c546359a95c57e8a0e4b3703c5086b15f24;hp=e873ed7ba2a41567057290ddae5eeddbbf4d6832;hpb=00908dc27a4d93bd1c5bda3bcdc84ec351e9a09a;p=openvswitch diff --git a/utilities/ovs-ofctl.c b/utilities/ovs-ofctl.c index e873ed7b..665a2c7a 100644 --- a/utilities/ovs-ofctl.c +++ b/utilities/ovs-ofctl.c @@ -918,11 +918,15 @@ do_mod_flows(const struct settings *s, int argc UNUSED, char *argv[]) struct vconn *vconn; struct ofpbuf *buffer; struct ofp_flow_mod *ofm; + struct ofp_match match; - /* Parse and send. */ - ofm = make_openflow(sizeof *ofm, OFPT_FLOW_MOD, &buffer); - str_to_flow(argv[2], &ofm->match, buffer, + /* Parse and send. str_to_flow() will expand and reallocate the data in + * 'buffer', so we can't keep pointers to across the str_to_flow() call. */ + make_openflow(sizeof *ofm, OFPT_FLOW_MOD, &buffer); + str_to_flow(argv[2], &match, buffer, NULL, NULL, &priority, &idle_timeout, &hard_timeout); + ofm = buffer->data; + ofm->match = match; if (s->strict) { ofm->command = htons(OFPFC_MODIFY_STRICT); } else {