aboutsummaryrefslogtreecommitdiff
path: root/tests/test-classifier.c
diff options
context:
space:
mode:
authorEthan Jackson <ethan@nicira.com>2012-06-06 17:37:46 -0700
committerEthan Jackson <ethan@nicira.com>2012-06-06 17:37:46 -0700
commit3b842fc2f0f8367d7d1350a80f7c29edca0925b5 (patch)
tree83964ebe8d8093b19c4eff056b35c56f3bc44e20 /tests/test-classifier.c
parentaecfb4af7e87a78dfec44db1fa82c4463a7f8309 (diff)
packets: Fix eth_addr_equal_except().
It turns out that eth_addr_equal_except() computed the exact opposite of what it purported to. It returned true if the two arguments where *not* equal. This is extremely confusing, so this patch changes it. Signed-off-by: Ethan Jackson <ethan@nicira.com>
Diffstat (limited to 'tests/test-classifier.c')
-rw-r--r--tests/test-classifier.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/test-classifier.c b/tests/test-classifier.c
index 7403159d..25f6edb4 100644
--- a/tests/test-classifier.c
+++ b/tests/test-classifier.c
@@ -203,11 +203,11 @@ match(const struct cls_rule *wild, const struct flow *fixed)
} else if (f_idx == CLS_F_IDX_TP_DST) {
eq = !((fixed->tp_dst ^ wild->flow.tp_dst) & wild->wc.tp_dst_mask);
} else if (f_idx == CLS_F_IDX_DL_SRC) {
- eq = !eth_addr_equal_except(fixed->dl_src, wild->flow.dl_src,
- wild->wc.dl_src_mask);
+ eq = eth_addr_equal_except(fixed->dl_src, wild->flow.dl_src,
+ wild->wc.dl_src_mask);
} else if (f_idx == CLS_F_IDX_DL_DST) {
- eq = !eth_addr_equal_except(fixed->dl_dst, wild->flow.dl_dst,
- wild->wc.dl_dst_mask);
+ eq = eth_addr_equal_except(fixed->dl_dst, wild->flow.dl_dst,
+ wild->wc.dl_dst_mask);
} else if (f_idx == CLS_F_IDX_VLAN_TCI) {
eq = !((fixed->vlan_tci ^ wild->flow.vlan_tci)
& wild->wc.vlan_tci_mask);