From: Justin Pettit Date: Sat, 31 Dec 2011 01:56:08 +0000 (-0800) Subject: ovs-ofctl: Fix "cookie mask" issue in diff-flows command. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ecc798abbcc349617d689b189b3429619dccfc4b;p=openvswitch ovs-ofctl: Fix "cookie mask" issue in diff-flows command. Commit e729e79 (Add ability to restrict flow mods and flow stats requests to cookies.) introduced a cookie_mask field to the ofputil_flow_stats_request struct that allowed restricting the flows to a particular cookie pattern. The diff-flows command uses the read_flows_from_switch() function, which did not properly initialize this field, which would cause it to miss flows. This commit sets the value to zero, which allows any cookie. Bug #8984 Signed-off-by: Justin Pettit Reported-by: Luca Giraudo --- diff --git a/utilities/ovs-ofctl.c b/utilities/ovs-ofctl.c index edeadfb4..7b20ba09 100644 --- a/utilities/ovs-ofctl.c +++ b/utilities/ovs-ofctl.c @@ -1180,6 +1180,7 @@ read_flows_from_switch(struct vconn *vconn, enum nx_flow_format flow_format, cls_rule_init_catchall(&fsr.match, 0); fsr.out_port = OFPP_NONE; fsr.table_id = 0xff; + fsr.cookie = fsr.cookie_mask = htonll(0); request = ofputil_encode_flow_stats_request(&fsr, flow_format); send_xid = ((struct ofp_header *) request->data)->xid; send_openflow_buffer(vconn, request);