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.
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;