summaryrefslogtreecommitdiffstats
path: root/filter
diff options
context:
space:
mode:
authorOndrej Filip <feela@majklik.network.cz>2009-05-28 13:37:04 +0200
committerOndrej Filip <feela@majklik.network.cz>2009-05-28 13:37:04 +0200
commita6c9f0648db56175ee9e077e2ca631b678552835 (patch)
treebe88e502b9e06aeadde6dbfcbcd4003af3676d2a /filter
parent4c2507da687cdad1b9d147c1655e5ac46aaaa511 (diff)
downloadbird-a6c9f0648db56175ee9e077e2ca631b678552835.tar
bird-a6c9f0648db56175ee9e077e2ca631b678552835.zip
Missing boolean comparison added.
Diffstat (limited to 'filter')
-rw-r--r--filter/filter.c3
-rw-r--r--filter/test.conf5
2 files changed, 6 insertions, 2 deletions
diff --git a/filter/filter.c b/filter/filter.c
index 313d2fa..944befb 100644
--- a/filter/filter.c
+++ b/filter/filter.c
@@ -120,7 +120,8 @@ val_compare(struct f_val v1, struct f_val v2)
}
switch (v1.type) {
case T_ENUM:
- case T_INT:
+ case T_INT:
+ case T_BOOL:
case T_PAIR:
if (v1.val.i == v2.val.i) return 0;
if (v1.val.i < v2.val.i) return -1;
diff --git a/filter/test.conf b/filter/test.conf
index af88907..f1cdf04 100644
--- a/filter/test.conf
+++ b/filter/test.conf
@@ -155,6 +155,9 @@ string s;
b = true;
print "Testing bool: ", b, ", ", !b;
+
+ if ( b = true ) then print "Testing bool comparison b = true: ", b;
+ else { print "*** FAIL: TRUE test failed" ; quitbird; }
pxs = [ 1.2.0.0/16, 1.4.0.0/16+];
print "Testing prefix sets: ";
@@ -202,4 +205,4 @@ int j;
accept "ok I take that";
}
-eval __startup(); \ No newline at end of file
+eval __startup();