summaryrefslogtreecommitdiffstats
path: root/src/expect/compare.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/expect/compare.c')
-rw-r--r--src/expect/compare.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/expect/compare.c b/src/expect/compare.c
index a524f4c..484d7b1 100644
--- a/src/expect/compare.c
+++ b/src/expect/compare.c
@@ -18,8 +18,13 @@ static int exp_cmp(int attr,
const struct nf_expect *exp2,
unsigned int flags))
{
- if (test_bit(attr, exp1->set) && test_bit(attr, exp2->set)) {
+ int a = test_bit(attr, exp1->set);
+ int b = test_bit(attr, exp2->set);
+
+ if (a && b) {
return cmp(exp1, exp2, flags);
+ } else if (!a && !b) {
+ return 1;
} else if (flags & NFCT_CMP_MASK &&
test_bit(attr, exp1->set)) {
return 0;