ofp-util: Fix encoding of NXST_AGGREGATE requests.
authorBen Pfaff <blp@nicira.com>
Tue, 14 Dec 2010 00:20:54 +0000 (16:20 -0800)
committerBen Pfaff <blp@nicira.com>
Wed, 15 Dec 2010 17:48:18 +0000 (09:48 -0800)
They were being sent out as NXST_FLOW requests.

lib/ofp-util.c

index b4b7ecddd33138ae76b4a08e45290fa5f770b758..ad9d19403dfe85c3cd7f30efae604a7069e42692 100644 (file)
@@ -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;