From: anton Date: Thu, 29 Feb 2024 06:54:29 +0000 (+0000) Subject: Stop assuming arbitrary rdomains are available and use the first given X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=ddd1eaf03dfad94f59c8a2ef97aaf1bd12b25626;p=openbsd Stop assuming arbitrary rdomains are available and use the first given rdomain as the vnetid. --- diff --git a/regress/sys/net/vxlan/vxlan_2.sh b/regress/sys/net/vxlan/vxlan_2.sh index 6b98060619a..c7c600f80dd 100644 --- a/regress/sys/net/vxlan/vxlan_2.sh +++ b/regress/sys/net/vxlan/vxlan_2.sh @@ -1,5 +1,5 @@ #!/bin/ksh -# $Id: vxlan_2.sh,v 1.4 2023/10/19 18:36:41 anton Exp $ +# $Id: vxlan_2.sh,v 1.5 2024/02/29 06:54:29 anton Exp $ CAPFILE=$(mktemp -t regress_vxlan.XXXXXXX) @@ -104,10 +104,12 @@ vstack_add() { . ${CURDIR}/vxlan_subr -VNETID=0 +# Use the first rdomain as the vnetid. +VNETID="$(set -- $RDOMAINS; echo $1)" +RDOMAINS="$(set -- $RDOMAINS; shift 1; echo $@)" + for rdom in $RDOMAINS; do rdomain_is_used $rdom || abort_test "rdomain $rdom already in use" - [[ $rdom -ge $VNETID ]] && VNETID=$(( rdom + 1 )) done rdomain_is_used $VNETID || abort_test "rdomain $rdom already in use"