Don't display unreachable address

This commit is contained in:
Bob Mottram 2017-09-25 14:40:12 +01:00
parent d73f5a6785
commit 88d45d0b23
1 changed files with 3 additions and 1 deletions

View File

@ -522,7 +522,9 @@ function show_ip_addresses {
echo -n "IPv4: $(get_ipv4_address)/$(get_external_ipv4_address)"
ipv6_address="$(get_ipv6_address)"
if [ ${#ipv6_address} -gt 0 ]; then
echo " IPv6: ${ipv6_address}"
if [[ "$ipv6_address" != *'unreachable'* ]]; then
echo " IPv6: ${ipv6_address}"
fi
fi
echo ''
echo ''