mirror of
https://github.com/YunoHost-Apps/adguardhome_ynh.git
synced 2024-09-03 18:06:23 +02:00
fix IP validation for IPv6
This commit is contained in:
parent
2e5a03320f
commit
22a3d330ed
1 changed files with 1 additions and 1 deletions
|
@ -64,7 +64,7 @@ process_ips(){
|
||||||
for i in $(seq "$(echo "$ips" | wc -w)" -1 1); do
|
for i in $(seq "$(echo "$ips" | wc -w)" -1 1); do
|
||||||
ip=$(echo "$ips" | awk "{print \$$i}")
|
ip=$(echo "$ips" | awk "{print \$$i}")
|
||||||
# check if the so-called IP really is one
|
# check if the so-called IP really is one
|
||||||
if ynh_validate_ip4 --ip_address="$ip"; then
|
if ynh_validate_ip4 --ip_address="$ip" || ynh_validate_ip6 --ip_address="$ip"; then
|
||||||
# if the IP is public and the user doesn't want to expose port 53, skip it
|
# if the IP is public and the user doesn't want to expose port 53, skip it
|
||||||
if is_public_ip "$ip" && [ "$open_port_53" == "false" ] ; then
|
if is_public_ip "$ip" && [ "$open_port_53" == "false" ] ; then
|
||||||
break
|
break
|
||||||
|
|
Loading…
Add table
Reference in a new issue