From 58a0d7594ea1fb9efbdc3bd7989e39cf52a18cad Mon Sep 17 00:00:00 2001 From: OniriCorpe Date: Wed, 27 Dec 2023 06:29:51 +0100 Subject: [PATCH] typo --- scripts/_common.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index 5972415..3d26a9c 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -12,14 +12,14 @@ is_public_ip(){ local IP IP="$1" if [[ "$IP" =~ ^10.*|^169.*|^172.*|^192.168.* ]] ; then - # private ipv4 - returns false + # private ipv4, so false + return 1 elif [[ "$IP" =~ ^fc*|^fd*|^fe80:* ]] ; then - # private ipv6 - returns false + # private ipv6, so false + return 1 else - # public ip - returns true + # public ip, so true + return 0 fi }