From: Ben Pfaff Date: Wed, 18 Mar 2009 17:59:48 +0000 (-0700) Subject: secchan: Properly maintain super-rule's list of subrules when revalidating. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c778f10362b68b8d878282c6f199f600f12613de;p=openvswitch secchan: Properly maintain super-rule's list of subrules when revalidating. When we revalidated a subrule and found that it had a new super-rule, we changed the subrule's pointer to its super-rule (rule->super), but we failed to actually transfer it from the previous super-rule's list of subrules to the new super-rule's list. This fixes the problem. --- diff --git a/secchan/ofproto.c b/secchan/ofproto.c index c76ad3dc..781cd98c 100644 --- a/secchan/ofproto.c +++ b/secchan/ofproto.c @@ -2846,7 +2846,11 @@ revalidate_rule(struct ofproto *p, struct rule *rule) classifier_remove(&p->cls, &rule->cr); rule_destroy(rule); return false; - } else { + } else if (super != rule->super) { + if (rule->super != UNKNOWN_SUPER) { + list_remove(&rule->list); + } + list_push_back(&super->list, &rule->list); rule->super = super; rule->hard_timeout = super->hard_timeout; rule->idle_timeout = super->idle_timeout;