mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-11-25 23:53:17 +00:00
Ignore ABP style entries in debug log dig test (#5382)
This commit is contained in:
commit
0bf33edda1
1 changed files with 6 additions and 2 deletions
|
@ -809,11 +809,15 @@ dig_at() {
|
||||||
local record_type="A"
|
local record_type="A"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Find a random blocked url that has not been whitelisted.
|
# Find a random blocked url that has not been whitelisted and is not ABP style.
|
||||||
# This helps emulate queries to different domains that a user might query
|
# This helps emulate queries to different domains that a user might query
|
||||||
# It will also give extra assurance that Pi-hole is correctly resolving and blocking domains
|
# It will also give extra assurance that Pi-hole is correctly resolving and blocking domains
|
||||||
local random_url
|
local random_url
|
||||||
random_url=$(pihole-FTL sqlite3 "${PIHOLE_GRAVITY_DB_FILE}" "SELECT domain FROM vw_gravity ORDER BY RANDOM() LIMIT 1")
|
random_url=$(pihole-FTL sqlite3 "${PIHOLE_GRAVITY_DB_FILE}" "SELECT domain FROM vw_gravity WHERE domain not like '||%^' ORDER BY RANDOM() LIMIT 1")
|
||||||
|
# Falback if no non-ABP style domains were found
|
||||||
|
if [ -z "${random_url}" ]; then
|
||||||
|
random_url="flurry.com"
|
||||||
|
fi
|
||||||
|
|
||||||
# Next we need to check if Pi-hole can resolve a domain when the query is sent to it's IP address
|
# Next we need to check if Pi-hole can resolve a domain when the query is sent to it's IP address
|
||||||
# This better emulates how clients will interact with Pi-hole as opposed to above where Pi-hole is
|
# This better emulates how clients will interact with Pi-hole as opposed to above where Pi-hole is
|
||||||
|
|
Loading…
Reference in a new issue