diff options
Diffstat (limited to 'filter')
-rw-r--r-- | filter/filter.c | 3 | ||||
-rw-r--r-- | filter/test.conf | 4 |
2 files changed, 5 insertions, 2 deletions
diff --git a/filter/filter.c b/filter/filter.c index c35d0425..432fa122 100644 --- a/filter/filter.c +++ b/filter/filter.c @@ -418,6 +418,9 @@ val_in_range(struct f_val v1, struct f_val v2) if ((v1.type == T_ECLIST) && (v2.type == T_SET)) return eclist_match_set(v1.val.ad, v2.val.t); + if ((v1.type == T_PATH) && (v2.type == T_SET)) + return as_path_match_set(v1.val.ad, v2.val.t); + if (v2.type == T_SET) switch (v1.type) { case T_ENUM: diff --git a/filter/test.conf b/filter/test.conf index 64e6d91b..3b29232a 100644 --- a/filter/test.conf +++ b/filter/test.conf @@ -95,10 +95,10 @@ eclist el2; p2 = prepend( p2, 3 ); p2 = prepend( p2, 4 ); print "Testing paths: ", p2; - print "Should be true: ", p2 ~ pm1, " ", p2 ~ pm2, " ", 3 ~ p2; + print "Should be true: ", p2 ~ pm1, " ", p2 ~ pm2, " ", 3 ~ p2, " ", p2 ~ [2, 10..20], " ", p2 ~ [4, 10..20]; print "4 = ", p2.len; p2 = prepend( p2, 5 ); - print "Should be false: ", p2 ~ pm1, " ", p2 ~ pm2, " ", 10 ~ p2; + print "Should be false: ", p2 ~ pm1, " ", p2 ~ pm2, " ", 10 ~ p2, " ", p2 ~ [8, 10..20],; print "Should be true: ", p2 ~ / ? 4 3 2 1 /, " ", p2, " ", / ? 4 3 2 1 /; print "Should be true: ", p2 ~ [= * 4 3 * 1 =], " ", p2, " ", [= * 4 3 * 1 =]; print "Should be true: ", p2 ~ [= (3+2) (2*2) 3 2 1 =], " ", p2 ~ mkpath(5, 4); |