discovery.sh: fix wan scanning when IPv6 is enabled.

arm-master
lancethepants 8 months ago
parent 197cc5f8f4
commit 3441f4f24f

@ -117,7 +117,7 @@ fi
scanthis() { scanthis() {
for iface in $this; do for iface in $this; do
cidr=$(ip a l dev "$iface" | grep inet | awk '{print $2}') cidr=$(ip a l dev "$iface" | grep inet | grep -v inet6 | awk '{print $2}')
[ "$(echo "$cidr" | cut -d/ -f2)" -lt 22 ] && { [ "$(echo "$cidr" | cut -d/ -f2)" -lt 22 ] && {
echo "$iface - subnet mask shorter than /22. Too many IPs to scan - skipping..." | tee /dev/tty | logger echo "$iface - subnet mask shorter than /22. Too many IPs to scan - skipping..." | tee /dev/tty | logger
continue continue

Loading…
Cancel
Save