Fix learning-switch STP breakage from "out_port" in flow stats request.
authorBen Pfaff <blp@nicira.com>
Fri, 26 Dec 2008 18:28:17 +0000 (10:28 -0800)
committerBen Pfaff <blp@nicira.com>
Fri, 26 Dec 2008 21:26:41 +0000 (13:26 -0800)
ofp_flow_stats_request recently added a new member, "out_port", to select
only flows that output to a particular port.  Unfortunately this code
in learning-switch.c was not updated to set that member to OFPP_NONE,
with the result that it would only get flows that output to port 0.

This bug was found when looking at this code for another reason and thus
is no guarantee that the STP code in learning-switch actually works.

lib/learning-switch.c

index 76636a7..e89b257 100644 (file)
@@ -210,6 +210,7 @@ lswitch_run(struct lswitch *sw, struct rconn *rconn)
             ofsr = (struct ofp_flow_stats_request *) osr->body;
             ofsr->match.wildcards = htonl(OFPFW_ALL);
             ofsr->table_id = 0xff;
+            ofsr->out_port = htons(OFPP_NONE);
 
             error = rconn_send(rconn, b, NULL);
             if (error) {