1
0
mirror of https://github.com/pi-hole/pi-hole synced 2025-01-03 12:40:56 +00:00

Merge pull request #1038 from pi-hole/fix/IPV6_detection

Check IPv6 routing
This commit is contained in:
Mcat12 2016-12-27 11:42:23 -05:00 committed by GitHub
commit 7fadd469c9

View File

@ -278,8 +278,11 @@ chooseInterface() {
useIPv6dialog() {
# Show the IPv6 address used for blocking
IPV6_ADDRESS=$(ip -6 route get 2001:4860:4860::8888 | awk -F " " '{ for(i=1;i<=NF;i++) if ($i == "src") print $(i+1) }')
IPV6_ADDRESS=$(ip -6 route get 2001:4860:4860::8888 | grep -v "unreachable" | awk -F " " '{ for(i=1;i<=NF;i++) if ($i == "src") print $(i+1) }')
if [[ ! -z "${IPV6_ADDRESS}" ]]; then
whiptail --msgbox --backtitle "IPv6..." --title "IPv6 Supported" "$IPV6_ADDRESS will be used to block ads." ${r} ${c}
fi
}