From: Ben Pfaff Date: Mon, 4 May 2009 23:18:19 +0000 (-0700) Subject: secchan: When listing flows, uninstall rules that shouldn't be installed. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bf2ebb02b79918d1fc15bdcbfa81b13e8077c7cd;p=openvswitch secchan: When listing flows, uninstall rules that shouldn't be installed. 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.) --- diff --git a/secchan/ofproto.c b/secchan/ofproto.c index 7faa0d8c..6675692f 100644 --- a/secchan/ofproto.c +++ b/secchan/ofproto.c @@ -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; }