From c778f10362b68b8d878282c6f199f600f12613de Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Wed, 18 Mar 2009 10:59:48 -0700 Subject: [PATCH] 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. --- secchan/ofproto.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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; -- 2.30.2