From 9d600fce159372747950f3061e6def4036c2bffa Mon Sep 17 00:00:00 2001 From: randomshell Date: Sun, 23 Aug 2020 09:22:11 +0000 Subject: [PATCH] Suggest the host bit of IPv4 when asking for the host bit of IPv6 The host bit would surely be the same for both IPv4 and IPv6. --- wireguard-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wireguard-install.sh b/wireguard-install.sh index c705a93..2eabae1 100644 --- a/wireguard-install.sh +++ b/wireguard-install.sh @@ -285,7 +285,7 @@ function newClient() { until [[ ${IPV6_EXISTS} == '0' ]]; do until [[ ${CLIENT_DOT_IPV6} =~ ^[a-f0-9]{1,4}$ ]]; do - read -rp "Client's WireGuard IPv6: ${SERVER_WG_IPV6::-1}" -e -i "${CLIENT_DOT_IPV6}" CLIENT_DOT_IPV6 + read -rp "Client's WireGuard IPv6: ${SERVER_WG_IPV6::-1}" -e -i "${CLIENT_DOT_IPV4}" CLIENT_DOT_IPV6 done CLIENT_WG_IPV6="${SERVER_WG_IPV6::-1}${CLIENT_DOT_IPV6}" IPV6_EXISTS=$(grep -c "${CLIENT_WG_IPV6}" "/etc/wireguard/${SERVER_WG_NIC}.conf")