mirror of
https://github.com/pi-hole/pi-hole
synced 2024-12-23 07:18:07 +00:00
Protocol specific records checks.
Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net>
This commit is contained in:
parent
2547cc4c8d
commit
6f2fb57c08
@ -278,9 +278,11 @@ testResolver() {
|
|||||||
if [[ ${protocol} == "6" ]]; then
|
if [[ ${protocol} == "6" ]]; then
|
||||||
g_addr="2001:4860:4860::8888"
|
g_addr="2001:4860:4860::8888"
|
||||||
l_addr="::1"
|
l_addr="::1"
|
||||||
|
r_type="AAAA"
|
||||||
else
|
else
|
||||||
g_addr="8.8.8.8"
|
g_addr="8.8.8.8"
|
||||||
l_addr="127.0.0.1"
|
l_addr="127.0.0.1"
|
||||||
|
r_type="A"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Find a blocked url that has not been whitelisted.
|
# Find a blocked url that has not been whitelisted.
|
||||||
@ -290,7 +292,7 @@ testResolver() {
|
|||||||
|
|
||||||
|
|
||||||
log_write "Resolution of ${testurl} from Pi-hole (${l_addr}):"
|
log_write "Resolution of ${testurl} from Pi-hole (${l_addr}):"
|
||||||
if localdig=$(dig -"${protocol}" "${testurl}" @${l_addr} +short); then
|
if localdig=$(dig -"${protocol}" "${testurl}" @${l_addr} +short "${r_type}"); then
|
||||||
log_write "${localdig}"
|
log_write "${localdig}"
|
||||||
else
|
else
|
||||||
log_write "Failed to resolve ${testurl} on Pi-hole (${l_addr})"
|
log_write "Failed to resolve ${testurl} on Pi-hole (${l_addr})"
|
||||||
@ -298,7 +300,7 @@ testResolver() {
|
|||||||
log_write ""
|
log_write ""
|
||||||
|
|
||||||
log_write "Resolution of ${testurl} from Pi-hole (${IP}):"
|
log_write "Resolution of ${testurl} from Pi-hole (${IP}):"
|
||||||
if piholedig=$(dig -"${protocol}" "${testurl}" @"${IP}" +short); then
|
if piholedig=$(dig -"${protocol}" "${testurl}" @"${IP}" +short "${r_type}"); then
|
||||||
log_write "${piholedig}"
|
log_write "${piholedig}"
|
||||||
else
|
else
|
||||||
log_write "Failed to resolve ${testurl} on Pi-hole (${IP})"
|
log_write "Failed to resolve ${testurl} on Pi-hole (${IP})"
|
||||||
@ -307,7 +309,7 @@ testResolver() {
|
|||||||
|
|
||||||
|
|
||||||
log_write "Resolution of ${testurl} from ${g_addr}:"
|
log_write "Resolution of ${testurl} from ${g_addr}:"
|
||||||
if remotedig=$(dig -"${protocol}" "${testurl}" @${g_addr} +short); then
|
if remotedig=$(dig -"${protocol}" "${testurl}" @${g_addr} +short "${r_type}"); then
|
||||||
log_write "${remotedig:-NXDOMAIN}"
|
log_write "${remotedig:-NXDOMAIN}"
|
||||||
else
|
else
|
||||||
log_write "Failed to resolve ${testurl} on upstream server ${g_addr}"
|
log_write "Failed to resolve ${testurl} on upstream server ${g_addr}"
|
||||||
|
Loading…
Reference in New Issue
Block a user