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 <[email protected]>
Signed-off-by: Ben Pfaff <[email protected]>
---
 ofproto/ofproto.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/ofproto/ofproto.c b/ofproto/ofproto.c
index 249f2d5..093ccd5 100644
--- a/ofproto/ofproto.c
+++ b/ofproto/ofproto.c
@@ -4858,6 +4858,7 @@ oftable_replace_rule(struct rule *rule)
 
     victim = rule_from_cls_rule(classifier_replace(&table->cls, &rule->cr));
     if (victim) {
+        list_remove(&victim->expirable);
         eviction_group_remove_rule(victim);
     }
     eviction_group_add_rule(rule);
-- 
1.7.2.5

_______________________________________________
dev mailing list
[email protected]
http://openvswitch.org/mailman/listinfo/dev

Reply via email to