mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-12-24 13:50:17 +00:00
Only check IPv6 Gateway if it exists.
This commit is contained in:
parent
fc360abe43
commit
f73734acb0
1 changed files with 2 additions and 3 deletions
|
@ -152,7 +152,7 @@ ip_check() {
|
||||||
|| log_echo "No IPv6 addresses found."
|
|| log_echo "No IPv6 addresses found."
|
||||||
|
|
||||||
local IPv6_def_gateway=$(ip -6 r | grep default | cut -d ' ' -f 3)
|
local IPv6_def_gateway=$(ip -6 r | grep default | cut -d ' ' -f 3)
|
||||||
if [[ $? = 0 ]]; then
|
if [[ $? = 0 ]] && [[ -n ${IPv6_def_gateway} ]]; then
|
||||||
echo -n "::: Pinging default IPv6 gateway: "
|
echo -n "::: Pinging default IPv6 gateway: "
|
||||||
local IPv6_def_gateway_check="$(ping6 -q -W 3 -c 3 -n "${IPv6_def_gateway}" -I "${IPv6_interface}"| tail -n3)" \
|
local IPv6_def_gateway_check="$(ping6 -q -W 3 -c 3 -n "${IPv6_def_gateway}" -I "${IPv6_interface}"| tail -n3)" \
|
||||||
&& echo "Gateway Responded." || echo "Gateway did not respond."
|
&& echo "Gateway Responded." || echo "Gateway did not respond."
|
||||||
|
@ -164,8 +164,7 @@ ip_check() {
|
||||||
else
|
else
|
||||||
IPv6_inet_check="No IPv6 Gateway Detected"
|
IPv6_inet_check="No IPv6 Gateway Detected"
|
||||||
fi
|
fi
|
||||||
log_write "${IPv6_inet_check}"
|
log_echo "${IPv6_inet_check}"
|
||||||
log_write ""
|
|
||||||
echo ":::"
|
echo ":::"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue