From 02396f569f81dd9f71b32eb7863335caf3a9b78c Mon Sep 17 00:00:00 2001 From: tschettervictor <85497460+tschettervictor@users.noreply.github.com> Date: Sun, 5 Jan 2025 21:55:28 -0700 Subject: [PATCH] vnet: start VNET jails at 1 because bastille0 is used as a loopback --- usr/local/share/bastille/common.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/usr/local/share/bastille/common.sh b/usr/local/share/bastille/common.sh index f48f5c88..35d46126 100644 --- a/usr/local/share/bastille/common.sh +++ b/usr/local/share/bastille/common.sh @@ -230,8 +230,8 @@ generate_vnet_jail_netblock() { ## determine number of interfaces + 1 ## iterate num and grep all jail configs ## define uniq_epair - local _epair_if_count="$(grep -Eos 'epair[0-9]+' ${bastille_jailsdir}/*/jail.conf | sort -u | wc -l | awk '{print $1}')" - local _vnet_if_count="$(grep -Eos 'bastille[0-9]+' ${bastille_jailsdir}/*/jail.conf | sort -u | wc -l | awk '{print $1}')" + local _epair_if_count="$(grep -Eos 'epair[1-9]+' ${bastille_jailsdir}/*/jail.conf | sort -u | wc -l | awk '{print $1}')" + local _vnet_if_count="$(grep -Eos 'bastille[1-9]+' ${bastille_jailsdir}/*/jail.conf | sort -u | wc -l | awk '{print $1}')" local epair_num_range=$((_epair_if_count + 1)) local vnet_num_range=$((_vnet_if_count + 1)) if [ -n "${use_unique_bridge}" ]; then @@ -243,7 +243,7 @@ generate_vnet_jail_netblock() { fi done else - local uniq_epair_bridge="0" + local uniq_epair_bridge="1" fi else if [ "${_vnet_if_count}" -gt 0 ]; then @@ -254,7 +254,7 @@ generate_vnet_jail_netblock() { fi done else - local uniq_epair="bastille0" + local uniq_epair="bastille1" fi fi ## If BRIDGE is enabled, generate bridge config, else generate VNET config