1
1
mirror of https://github.com/angristan/wireguard-install.git synced 2024-06-05 13:00:48 +00:00

Add warning for full subnet

This commit is contained in:
randomshell 2020-07-31 21:25:22 +00:00
parent 31628cb309
commit ebba01cdf8

View File

@ -239,6 +239,12 @@ function newClient() {
fi
done
if [[ ${DOT_EXISTS} == '1' ]]; then
echo ""
echo "The subnet configured supports only 253 clients."
exit 1
fi
until [[ "${IPV4_EXISTS}" == '0' ]]; do
read -rp "Client's WireGuard IPv4: ${SERVER_WG_IPV4::-1}" -e -i "${DOT_IP}" DOT_IP
CLIENT_WG_IPV4="${SERVER_WG_IPV4::-1}${DOT_IP}"