X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=utilities%2Fovs-ofctl.c;h=473385d37db1208d716964c9a635dfaf7b6e789a;hb=bf16ba4a9b1b4a38c867349e70e39d551b406b32;hp=7511769421093711fa353d4eb9999e0cc9871728;hpb=28c8bad14f17fea722632e6483e61c80a1b9a8e0;p=openvswitch diff --git a/utilities/ovs-ofctl.c b/utilities/ovs-ofctl.c index 75117694..473385d3 100644 --- a/utilities/ovs-ofctl.c +++ b/utilities/ovs-ofctl.c @@ -263,11 +263,10 @@ static void * alloc_stats_request(size_t body_len, uint16_t type, struct ofpbuf **bufferp) { struct ofp_stats_msg *rq; - rq = make_openflow((offsetof(struct ofp_stats_msg, body) - + body_len), OFPT_STATS_REQUEST, bufferp); + rq = make_openflow(sizeof *rq + body_len, OFPT_STATS_REQUEST, bufferp); rq->type = htons(type); rq->flags = htons(0); - return rq->body; + return rq + 1; } static void