From 56cbde1a2fc19a55e52962254082d94d9b223888 Mon Sep 17 00:00:00 2001 From: Stephen Seo Date: Sat, 17 Feb 2024 15:32:14 +0900 Subject: [PATCH] Fix client count bug when ipv4 subnet is /24 --- wireguardConfigGenerator.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wireguardConfigGenerator.sh b/wireguardConfigGenerator.sh index dadbc5c..30b1d78 100755 --- a/wireguardConfigGenerator.sh +++ b/wireguardConfigGenerator.sh @@ -117,7 +117,7 @@ fi if (( $WG_SUBNET < 24 )); then echo "ERROR: subnet cannot be less than 24!" exit 9 -elif (( $WG_SUBNET > 24 )); then +elif (( $WG_SUBNET >= 24 )); then USED_BITS=$(( 32 - $WG_SUBNET )) if (( $USED_BITS < 2 )); then echo "ERROR: subnet \"$WG_SUBNET\" is too large! Use 24-30!"