Skip to content

Commit

Permalink
ofproto: Fix is_flow_deletion_pending() false positive.
Browse files Browse the repository at this point in the history
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 <[email protected]>
Acked-by: Ben Pfaff <[email protected]>
  • Loading branch information
ejj committed May 1, 2014
1 parent 0ef165e commit a6fcf46
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ofproto/ofproto.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down

0 comments on commit a6fcf46

Please sign in to comment.