classifer: Fix test classifier to match real classifier.
authorJesse Gross <jesse@nicira.com>
Fri, 19 Mar 2010 17:54:36 +0000 (13:54 -0400)
committerJesse Gross <jesse@nicira.com>
Fri, 19 Mar 2010 17:59:09 +0000 (13:59 -0400)
The trivial test classifier had the same bug as the real classifier
when replacing matching flows.  This caused it to not find the
original bug and then break when the bug was fixed.

tests/test-classifier.c

index 09884d7..0c9574e 100644 (file)
@@ -111,7 +111,7 @@ tcls_insert(struct tcls *tcls, const struct test_rule *rule)
             free(tcls->rules[i]);
             tcls->rules[i] = xmemdup(rule, sizeof *rule);
             return tcls->rules[i];
-        } else if (pos->priority <= rule->cls_rule.priority) {
+        } else if (pos->priority < rule->cls_rule.priority) {
             break;
         }
     }