secchan: When listing flows, uninstall rules that shouldn't be installed.
authorBen Pfaff <blp@nicira.com>
Mon, 4 May 2009 23:18:19 +0000 (16:18 -0700)
committerBen Pfaff <blp@nicira.com>
Mon, 4 May 2009 23:18:19 +0000 (16:18 -0700)
To implement flow expiration, secchan periodically queries all the flows
in the datapath flow table.  Until now, it has then uninstalled flows that
do not have corresponding rules at all.  It has not uninstalled flows that
do have rules that are not supposed to be installed.  This commit makes it
also uninstall the latter.

(This is not known to fix any real problem.  It is only for completeness.)

secchan/ofproto.c

index 7faa0d8c8bda51b53a8ef821de6853ee9885395a..6675692f4b21eedb81352e9eb004bae115bac184 100644 (file)
@@ -3108,7 +3108,7 @@ update_used(struct ofproto *p)
 
         rule = rule_from_cls_rule(
             classifier_find_rule_exactly(&p->cls, &f->key, 0, UINT16_MAX));
-        if (!rule) {
+        if (!rule || !rule->installed) {
             dpif_flow_del(&p->dpif, f);
             continue;
         }