#!/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)
. ${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"