From 2545f9907f11871cef985efa5431d7e994267e97 Mon Sep 17 00:00:00 2001 From: m0duspwnens Date: Mon, 24 Jul 2023 17:00:20 -0400 Subject: [PATCH] dont allow 172.17.0.0/24 for custom dockernet --- setup/so-functions | 2 +- setup/so-whiptail | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup/so-functions b/setup/so-functions index bf66a8aa8..8a5416e3d 100755 --- a/setup/so-functions +++ b/setup/so-functions @@ -245,7 +245,7 @@ collect_dns() { collect_dns_domain() { whiptail_management_interface_dns_search "searchdomain.local" - while ! valid_fqdn "$MSEARCH"; do + while ! valid_ip4 "$DOCKERNET" || [[ $DOCKERNET =~ "172.17.0." ]]; do whiptail_invalid_input whiptail_management_interface_dns_search "$MSEARCH" done diff --git a/setup/so-whiptail b/setup/so-whiptail index 74953f8c6..3c5a2504e 100755 --- a/setup/so-whiptail +++ b/setup/so-whiptail @@ -330,7 +330,7 @@ whiptail_dockernet_sosnet() { [ -n "$TESTING" ] && return DOCKERNET=$(whiptail --title "$whiptail_title" --inputbox \ - "\nEnter a /24 size network range for SOS containers to use WITHOUT the /24 suffix. This range will be used on ALL nodes." 11 65 "$1" 3>&1 1>&2 2>&3) + "\nEnter a /24 size network range for SOS containers to use WITHOUT the /24 suffix. This range will be used on ALL nodes. Any range within 172.17.0.0/24 cannot be used." 11 65 "$1" 3>&1 1>&2 2>&3) local exitstatus=$? whiptail_check_exitstatus $exitstatus