mirror of
https://github.com/hackacad/bastille.git
synced 2025-12-28 08:19:49 +01:00
rdr: Fix for JAIL_IP wrong format
This commit is contained in:
@@ -55,7 +55,7 @@ check_jail_validity() {
|
||||
_ip6_interfaces="$(bastille config ${TARGET} get ip6.addr | sed 's/,/ /g')"
|
||||
# Check if jail ip4.addr is valid (non-VNET only)
|
||||
if [ "${_ip4_interfaces}" != "not set" ] && [ "${_ip4_interfaces}" != "disable" ]; then
|
||||
if echo "&{_ip4_interfaces}" | grep -q "|"; then
|
||||
if echo "${_ip4_interfaces}" | grep -q "|"; then
|
||||
JAIL_IP="$(echo ${_ip4_interfaces} | awk '{print $1}' | awk -F"|" '{print $2}' | sed -E 's#/[0-9]+$##g')"
|
||||
else
|
||||
JAIL_IP="$(echo ${_ip4_interfaces} | sed -E 's#/[0-9]+$##g')"
|
||||
@@ -63,7 +63,7 @@ check_jail_validity() {
|
||||
fi
|
||||
# Check if jail ip6.addr is valid (non-VNET only)
|
||||
if [ "${_ip6_interfaces}" != "not set" ] && [ "${_ip6_interfaces}" != "disable" ]; then
|
||||
if echo "&{_ip6_interfaces}" | grep -q "|"; then
|
||||
if echo "${_ip6_interfaces}" | grep -q "|"; then
|
||||
JAIL_IP6="$(echo ${_ip6_interfaces} | awk '{print $1}' | awk -F"|" '{print $2}' | sed -E 's#/[0-9]+$##g')"
|
||||
else
|
||||
JAIL_IP6="$(echo ${_ip6_interfaces} | sed -E 's#/[0-9]+$##g')"
|
||||
|
||||
Reference in New Issue
Block a user