From: Ben Pfaff Date: Tue, 14 Dec 2010 00:20:54 +0000 (-0800) Subject: ofp-util: Fix encoding of NXST_AGGREGATE requests. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9fb7fa87d0956d0e9f61b69a9deabf29d0299555;p=openvswitch ofp-util: Fix encoding of NXST_AGGREGATE requests. They were being sent out as NXST_FLOW requests. --- diff --git a/lib/ofp-util.c b/lib/ofp-util.c index b4b7ecdd..ad9d1940 100644 --- a/lib/ofp-util.c +++ b/lib/ofp-util.c @@ -1140,8 +1140,10 @@ ofputil_encode_flow_stats_request(const struct flow_stats_request *fsr, } else if (flow_format == NXFF_NXM) { struct nx_flow_stats_request *nfsr; int match_len; + int subtype; - ofputil_make_nxstats_request(sizeof *nfsr, NXST_FLOW, &msg); + subtype = fsr->aggregate ? NXST_AGGREGATE : NXST_FLOW; + ofputil_make_nxstats_request(sizeof *nfsr, subtype, &msg); match_len = nx_put_match(msg, &fsr->match); nfsr = msg->data;