From 9fb7fa87d0956d0e9f61b69a9deabf29d0299555 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Mon, 13 Dec 2010 16:20:54 -0800 Subject: [PATCH] ofp-util: Fix encoding of NXST_AGGREGATE requests. They were being sent out as NXST_FLOW requests. --- lib/ofp-util.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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; -- 2.30.2