Commit
e503cc199 (ofproto: Optimise OpenFlow flow expiry) optimized
OpenFlow flow expiration by putting expirable flows on a list, but it
failed to remove flows from the list when they were replaced by a new
flow with an OpenFlow flow_mod "add" operation. This commit fixes the
problem.
Found by valgrind.
CC: Simon Horman <horms@verge.net.au>
Signed-off-by: Ben Pfaff <blp@nicira.com>
victim = rule_from_cls_rule(classifier_replace(&table->cls, &rule->cr));
if (victim) {
+ if (!list_is_empty(&victim->expirable)) {
+ list_remove(&victim->expirable);
+ }
eviction_group_remove_rule(victim);
}
eviction_group_add_rule(rule);