From: Ethan Jackson Date: Thu, 1 May 2014 00:24:21 +0000 (-0700) Subject: ofproto: Fix is_flow_deletion_pending() false positive. X-Git-Tag: sliver-openvswitch-2.2.90-1~3^2~13 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;ds=sidebyside;h=a6fcf462476db3385027d3bfcc1d2dc8386e6f2a;p=sliver-openvswitch.git ofproto: Fix is_flow_deletion_pending() false positive. If one tries to install a rule that's identical to another rule in another OpenFlow table which is being deleted, it's possible that is_flow_deletion_pending() might confuse them and block the installation. This is such an edge case I doubt it has ever actually happened. Found by inspection. Signed-off-by: Ethan Jackson Acked-by: Ben Pfaff --- diff --git a/ofproto/ofproto.c b/ofproto/ofproto.c index 208efc1e8..eb1f3be8a 100644 --- a/ofproto/ofproto.c +++ b/ofproto/ofproto.c @@ -3953,7 +3953,8 @@ is_flow_deletion_pending(const struct ofproto *ofproto, HMAP_FOR_EACH_WITH_HASH (op, hmap_node, cls_rule_hash(cls_rule, table_id), &ofproto->deletions) { - if (cls_rule_equal(cls_rule, &op->rule->cr)) { + if (op->rule->table_id == table_id + && cls_rule_equal(cls_rule, &op->rule->cr)) { return true; } }