summaryrefslogtreecommitdiff
path: root/filter/test.conf
diff options
context:
space:
mode:
authorOndrej Zajicek (work) <santiago@crfreenet.org>2016-10-01 12:50:29 +0200
committerOndrej Zajicek (work) <santiago@crfreenet.org>2016-10-03 12:48:56 +0200
commit66dbdbd993115c57acafdb776d2165d0b4a90a45 (patch)
tree802ed0a7926d5edca62fa0adeaf73ba203d2b2fb /filter/test.conf
parentf51b1f556595108d53b9f4580bfcb96bfbc85442 (diff)
BGP: Support for large communities
Add support for large communities (draft-ietf-idr-large-community), 96bit alternative to RFC 1997 communities. Thanks to Matt Griswold for the original patch.
Diffstat (limited to 'filter/test.conf')
-rw-r--r--filter/test.conf17
1 files changed, 17 insertions, 0 deletions
diff --git a/filter/test.conf b/filter/test.conf
index f61f0658..e8873fbf 100644
--- a/filter/test.conf
+++ b/filter/test.conf
@@ -27,6 +27,11 @@ function 'mkpair-a'(int a)
return (1, a);
}
+function mktrip(int a)
+{
+ return (a, 2*a, 3*a);
+}
+
function mkpath(int a; int b)
{
return [= a b 3 2 1 =];
@@ -89,6 +94,7 @@ clist l;
clist l2;
eclist el;
eclist el2;
+lclist ll;
{
print "Entering path test...";
pm1 = / 4 3 2 1 /;
@@ -203,6 +209,17 @@ eclist el2;
print "eclist A isect B: ", filter( el, el2 );
print "eclist A \ B: ", delete( el, el2 );
+ ll = --- empty ---;
+ ll = add(ll, (ten, 20, 30));
+ ll = add(ll, (1000, 2000, 3000));
+ ll = add(ll, mktrip(100000));
+ print "LC list (10, 20, 30) (1000, 2000, 3000) (100000, 200000, 300000):";
+ print ll;
+ print "LC len: ", el.len;
+ print "Should be true: ", mktrip(1000) ~ ll, " ", ll ~ [(5,10,15), (10,20,30)], " ", ll ~ [(10,15..25,*)], " ", ll ~ [(ten, *, *)];
+ print "Should be false: ", mktrip(100) ~ ll, " ", ll ~ [(5,10,15), (10,21,30)], " ", ll ~ [(10,21..25,*)], " ", ll ~ [(11, *, *)];
+ print "LC filtered: ", filter(ll, [(5..15, *, *), (100000, 500..500000, *)]);
+
# test_roa();
}