Only the data and size members were being initialized, but all of them
should be.
This is inspired by commit
b6f4590fa036 (dpif-netdev: Initialize
upcall->packet when queuing to userspace.) from master. The background is
not exactly the same as on master (the commit that it references is not
on branch-2.3).
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Pravin B Shelar <pshelar@nicira.com>
struct ofpbuf *buf = &u->buf;
size_t buf_size;
struct flow flow;
+ void *data;
upcall->type = type;
NLA_ALIGN(userdata->nla_len));
}
- ofpbuf_set_data(&upcall->packet,
- ofpbuf_put(buf, ofpbuf_data(packet), ofpbuf_size(packet)));
+ data = ofpbuf_put(buf, ofpbuf_data(packet), ofpbuf_size(packet));
+ ofpbuf_use_stub(&upcall->packet, data, ofpbuf_size(packet));
ofpbuf_set_size(&upcall->packet, ofpbuf_size(packet));
seq_change(q->seq);