From: claudio Date: Wed, 15 Feb 2023 14:19:08 +0000 (+0000) Subject: bgpd no longer immediatly opens the connection to its peers so instead X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=5412afca55847b0356719fed5eb1c79868b79c23;p=openbsd bgpd no longer immediatly opens the connection to its peers so instead use 'bgpctl nei RDOMAIN2 up' to force the connection up. While there use the same timeouts everywhere. May need further tuning but this works for me. Issue noticed by anton@ --- diff --git a/regress/usr.sbin/bgpd/integrationtests/l3vpn.sh b/regress/usr.sbin/bgpd/integrationtests/l3vpn.sh index 016e6d15a33..1608dab9152 100644 --- a/regress/usr.sbin/bgpd/integrationtests/l3vpn.sh +++ b/regress/usr.sbin/bgpd/integrationtests/l3vpn.sh @@ -1,5 +1,5 @@ #!/bin/ksh -# $OpenBSD: l3vpn.sh,v 1.3 2022/11/14 17:23:43 claudio Exp $ +# $OpenBSD: l3vpn.sh,v 1.4 2023/02/15 14:19:08 claudio Exp $ set -e @@ -87,11 +87,13 @@ ifconfig lo${RDOMAIN4} inet 127.0.0.1/8 echo run bgpds route -T ${RDOMAIN1} exec ${BGPD} \ -v -f ${BGPDCONFIGDIR}/bgpd.l3vpn.rdomain1.conf -sleep 1 route -T ${RDOMAIN2} exec ${BGPD} \ -v -f ${BGPDCONFIGDIR}/bgpd.l3vpn.rdomain2.conf -sleep 3 +sleep 1 +route -T ${RDOMAIN1} exec bgpctl nei RDOMAIN2 up +route -T ${RDOMAIN1} exec bgpctl nei RDOMAIN2v6 up +sleep 1 echo Check initial networks route -T ${RDOMAIN1} exec bgpctl show diff --git a/regress/usr.sbin/bgpd/integrationtests/maxcomm.sh b/regress/usr.sbin/bgpd/integrationtests/maxcomm.sh index 1662ebff284..e3d83661a31 100644 --- a/regress/usr.sbin/bgpd/integrationtests/maxcomm.sh +++ b/regress/usr.sbin/bgpd/integrationtests/maxcomm.sh @@ -1,5 +1,5 @@ #!/bin/ksh -# $OpenBSD: maxcomm.sh,v 1.1 2022/05/31 09:50:26 claudio Exp $ +# $OpenBSD: maxcomm.sh,v 1.2 2023/02/15 14:19:08 claudio Exp $ set -e @@ -67,11 +67,12 @@ ifconfig lo${RDOMAIN2} inet 127.0.0.1/8 echo run bgpds route -T ${RDOMAIN1} exec ${BGPD} \ -v -f ${BGPDCONFIGDIR}/bgpd.maxcomm.rdomain1.conf -sleep 1 route -T ${RDOMAIN2} exec ${BGPD} \ -v -f ${BGPDCONFIGDIR}/bgpd.maxcomm.rdomain2.conf +sleep 1 +route -T ${RDOMAIN1} exec bgpctl nei RDOMAIN2 up +sleep 1 -sleep 2 route -T ${RDOMAIN1} exec bgpctl sh rib | tee maxcomm.out sleep .2 diff -u ${BGPDCONFIGDIR}/maxcomm.ok maxcomm.out diff --git a/regress/usr.sbin/bgpd/integrationtests/maxprefix.sh b/regress/usr.sbin/bgpd/integrationtests/maxprefix.sh index 5901f481d35..fa4baf568e1 100644 --- a/regress/usr.sbin/bgpd/integrationtests/maxprefix.sh +++ b/regress/usr.sbin/bgpd/integrationtests/maxprefix.sh @@ -1,5 +1,5 @@ #!/bin/ksh -# $OpenBSD: maxprefix.sh,v 1.2 2022/03/08 17:20:52 claudio Exp $ +# $OpenBSD: maxprefix.sh,v 1.3 2023/02/15 14:19:08 claudio Exp $ set -e @@ -67,11 +67,12 @@ ifconfig lo${RDOMAIN2} inet 127.0.0.1/8 echo run bgpds route -T ${RDOMAIN1} exec ${BGPD} \ -v -f ${BGPDCONFIGDIR}/bgpd.maxprefix.rdomain1.conf -sleep 1 route -T ${RDOMAIN2} exec ${BGPD} \ -v -f ${BGPDCONFIGDIR}/bgpd.maxprefix.rdomain2.conf -sleep 2 +sleep 1 +route -T ${RDOMAIN1} exec bgpctl nei RDOMAIN2 up +sleep 1 echo test1: add two networks route -T ${RDOMAIN1} exec bgpctl network add 10.12.58.0/24 diff --git a/regress/usr.sbin/bgpd/integrationtests/maxprefixout.sh b/regress/usr.sbin/bgpd/integrationtests/maxprefixout.sh index 647469224db..77c1fcb6904 100644 --- a/regress/usr.sbin/bgpd/integrationtests/maxprefixout.sh +++ b/regress/usr.sbin/bgpd/integrationtests/maxprefixout.sh @@ -1,5 +1,5 @@ #!/bin/ksh -# $OpenBSD: maxprefixout.sh,v 1.1 2020/01/26 00:54:47 claudio Exp $ +# $OpenBSD: maxprefixout.sh,v 1.2 2023/02/15 14:19:08 claudio Exp $ set -e @@ -70,7 +70,9 @@ route -T ${RDOMAIN1} exec ${BGPD} \ route -T ${RDOMAIN2} exec ${BGPD} \ -v -f ${BGPDCONFIGDIR}/bgpd.maxprefixout.rdomain2.conf -sleep 3 +sleep 1 +route -T ${RDOMAIN1} exec bgpctl nei RDOMAIN2 up +sleep 1 echo test1: add two networks route -T ${RDOMAIN1} exec bgpctl network add 10.12.58.0/24 diff --git a/regress/usr.sbin/bgpd/integrationtests/md5.sh b/regress/usr.sbin/bgpd/integrationtests/md5.sh index 3ebaa309496..f17b013e1ec 100644 --- a/regress/usr.sbin/bgpd/integrationtests/md5.sh +++ b/regress/usr.sbin/bgpd/integrationtests/md5.sh @@ -1,5 +1,5 @@ #!/bin/ksh -# $OpenBSD: md5.sh,v 1.5 2022/03/08 17:20:52 claudio Exp $ +# $OpenBSD: md5.sh,v 1.6 2023/02/15 14:19:08 claudio Exp $ set -e @@ -71,7 +71,9 @@ sleep 1 route -T ${RDOMAIN2} exec ${BGPD} \ -v -f ${BGPDCONFIGDIR}/bgpd.md5.rdomain2.conf -sleep 2 +sleep 1 +route -T ${RDOMAIN1} exec bgpctl nei RDOMAIN2 up +sleep 1 echo test1 route -T ${RDOMAIN1} exec bgpctl sh sum | \ diff --git a/regress/usr.sbin/bgpd/integrationtests/network_statement.sh b/regress/usr.sbin/bgpd/integrationtests/network_statement.sh index 87250af2a48..66c704ed5eb 100644 --- a/regress/usr.sbin/bgpd/integrationtests/network_statement.sh +++ b/regress/usr.sbin/bgpd/integrationtests/network_statement.sh @@ -1,5 +1,5 @@ #!/bin/ksh -# $OpenBSD: network_statement.sh,v 1.7 2022/03/04 11:01:15 claudio Exp $ +# $OpenBSD: network_statement.sh,v 1.8 2023/02/15 14:19:08 claudio Exp $ set -e @@ -100,6 +100,10 @@ route -T ${RDOMAIN2} add -priority 55 ${PAIR2PRIORITY} \ route -T ${RDOMAIN2} exec ${BGPD} \ -v -f ${BGPDCONFIGDIR}/bgpd.network_statement.rdomain2.conf +sleep 1 +route -T ${RDOMAIN1} exec bgpctl nei RDOMAIN2 up +sleep 1 + wait_until <