diff --git a/ffmuc-mesh-vpn-wireguard-vxlan/files/lib/gluon/gluon-mesh-wireguard-vxlan/checkuplink b/ffmuc-mesh-vpn-wireguard-vxlan/files/lib/gluon/gluon-mesh-wireguard-vxlan/checkuplink index af2c6c78..f0717fbd 100755 --- a/ffmuc-mesh-vpn-wireguard-vxlan/files/lib/gluon/gluon-mesh-wireguard-vxlan/checkuplink +++ b/ffmuc-mesh-vpn-wireguard-vxlan/files/lib/gluon/gluon-mesh-wireguard-vxlan/checkuplink @@ -35,9 +35,13 @@ combine_ip_port() { local ip="$1" local port="$2" - if [[ ${ip} == *":"* ]]; then + # Add brackets in case the IP is an IPv6 + case $ip in + *":"*) ip="[${ip}]" - fi + ;; + esac + echo "$ip:$port" }