From e50278894386b9bd63f5f02088c401952b9d8b7d Mon Sep 17 00:00:00 2001 From: claudio Date: Fri, 21 Sep 2018 05:06:30 +0000 Subject: [PATCH] Add some more prefix-set test cases. Mainly to test edge cases in the RB tree implementation now used. --- regress/usr.sbin/bgpd/config/bgpd.conf.7.in | 12 ++++++++++-- regress/usr.sbin/bgpd/config/bgpd.conf.7.ok | 8 +++++++- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/regress/usr.sbin/bgpd/config/bgpd.conf.7.in b/regress/usr.sbin/bgpd/config/bgpd.conf.7.in index 7bfafe31ed3..5e234a5541f 100644 --- a/regress/usr.sbin/bgpd/config/bgpd.conf.7.in +++ b/regress/usr.sbin/bgpd/config/bgpd.conf.7.in @@ -1,4 +1,4 @@ -# $OpenBSD: bgpd.conf.7.in,v 1.5 2018/09/09 20:41:01 claudio Exp $ +# $OpenBSD: bgpd.conf.7.in,v 1.6 2018/09/21 05:06:30 claudio Exp $ # test prefix-set blocks AS 1 @@ -32,7 +32,15 @@ prefix-set "test5_prefixes" { 192.0.211.0/24 prefixlen 24 - 32, 2222:69:c000::/48 prefixlen 48 - 64, 0.0.0.0/0 or-longer, - 192.0.160.0/19 prefixlen >= 22 + 192.0.160.0/19 prefixlen >= 22, + 192.0.160.0/19 prefixlen = 32 +} + +prefix-set "test6_prefixes" { + 192.0.211.0/24 prefixlen 28 - 31, + 192.0.211.0/24 prefixlen 25 - 31, + 192.0.211.0/24, + 192.0.211.0/24 prefixlen 28 - 31 } # from the example bgpd.conf diff --git a/regress/usr.sbin/bgpd/config/bgpd.conf.7.ok b/regress/usr.sbin/bgpd/config/bgpd.conf.7.ok index 73e1c0ad5c2..0abcbfcee76 100644 --- a/regress/usr.sbin/bgpd/config/bgpd.conf.7.ok +++ b/regress/usr.sbin/bgpd/config/bgpd.conf.7.ok @@ -34,7 +34,13 @@ prefix-set "test4_prefixes" { prefix-set "test5_prefixes" { 0.0.0.0/0 or-longer, 192.0.160.0/19 prefixlen >= 22 - 192.0.211.0/24 or-longer, 2222:69:c000::/48 maxlen 64 + 192.0.160.0/19 prefixlen = 32, 192.0.211.0/24 or-longer + 2222:69:c000::/48 maxlen 64 +} + +prefix-set "test6_prefixes" { + 192.0.211.0/24, 192.0.211.0/24 prefixlen 25 - 31 + 192.0.211.0/24 prefixlen 28 - 31 } prefix-set "mynetworks" { -- 2.20.1