From 66dbdbd993115c57acafdb776d2165d0b4a90a45 Mon Sep 17 00:00:00 2001 From: "Ondrej Zajicek (work)" Date: Sat, 1 Oct 2016 12:50:29 +0200 Subject: 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. --- filter/test.conf | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'filter/test.conf') 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(); } -- cgit v1.2.3