mirror of
https://github.com/pi-hole/pi-hole
synced 2025-01-05 13:40:56 +00:00
Merge pull request #1038 from pi-hole/fix/IPV6_detection
Check IPv6 routing
This commit is contained in:
commit
7fadd469c9
@ -278,8 +278,11 @@ chooseInterface() {
|
|||||||
|
|
||||||
useIPv6dialog() {
|
useIPv6dialog() {
|
||||||
# Show the IPv6 address used for blocking
|
# 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}
|
whiptail --msgbox --backtitle "IPv6..." --title "IPv6 Supported" "$IPV6_ADDRESS will be used to block ads." ${r} ${c}
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user