secchan: Fix OpenFlow matching on output port with OFPFC_DELETE.
authorBen Pfaff <blp@nicira.com>
Mon, 27 Apr 2009 21:28:54 +0000 (14:28 -0700)
committerBen Pfaff <blp@nicira.com>
Fri, 1 May 2009 17:55:28 +0000 (10:55 -0700)
The implementation of matching on out_port was only half-implemented for
OFPFC_DELETE.  It was probably just overlooked.  This commit fixes it, by
supplying the other half.

secchan/ofproto.c

index b0cdec450e99c69c61537316aa64a3f3465945e3..0d8a6b8ba196f89c49bc0f81d9fb9bdadc0d0924 100644 (file)
@@ -2556,6 +2556,11 @@ modify_flows_cb(struct cls_rule *rule_, void *cbdata_)
     struct rule *rule = rule_from_cls_rule(rule_);
     struct modify_flows_cbdata *cbdata = cbdata_;
 
+    if (cbdata->out_port != htons(OFPP_NONE)
+        && !rule_has_out_port(rule, cbdata->out_port)) {
+        return;
+    }
+
     modify_flow(cbdata->ofproto, cbdata->ofm, cbdata->n_actions,
                 cbdata->command, rule);
 }