Commit 43f7c03a authored by Vitaly Lipatov's avatar Vitaly Lipatov

functions: skip dig fallback for timeout errors in bulk resolve

Timeout errors from adnshost (especially via 8.8.8.8) should not trigger dig fallback — retrying will also timeout. This was causing 10+ minute delays on hosts where 8.8.8.8 is unreachable. Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
parent 851165a0
...@@ -135,8 +135,8 @@ get_ipv4_list_bulk() ...@@ -135,8 +135,8 @@ get_ipv4_list_bulk()
print $2 print $2
}' }'
# Fallback to dig for CNAME/tempfail domains # Fallback to dig for CNAME domains (skip nxdomain/nodata/timeout)
grep "^;" "$adns_out" | grep -v 'nxdomain\|nodata\|querydomaintoolong' | \ grep "^;" "$adns_out" | grep -v 'nxdomain\|nodata\|timeout\|querydomaintoolong' | \
awk '{ for(i=4;i<=NF;i++) if($i ~ /^[a-z0-9].*\.[a-z]/) { print $i; break } }' | \ awk '{ for(i=4;i<=NF;i++) if($i ~ /^[a-z0-9].*\.[a-z]/) { print $i; break } }' | \
sort -u | while read domain ; do sort -u | while read domain ; do
echo echo
...@@ -178,8 +178,8 @@ get_ipv6_list_bulk() ...@@ -178,8 +178,8 @@ get_ipv6_list_bulk()
print $2 print $2
}' }'
# Fallback to dig for CNAME/tempfail domains # Fallback to dig for CNAME domains (skip nxdomain/nodata/timeout)
grep "^;" "$adns_out" | grep -v 'nxdomain\|nodata\|querydomaintoolong' | \ grep "^;" "$adns_out" | grep -v 'nxdomain\|nodata\|timeout\|querydomaintoolong' | \
awk '{ for(i=4;i<=NF;i++) if($i ~ /^[a-z0-9].*\.[a-z]/) { print $i; break } }' | \ awk '{ for(i=4;i<=NF;i++) if($i ~ /^[a-z0-9].*\.[a-z]/) { print $i; break } }' | \
sort -u | while read domain ; do sort -u | while read domain ; do
echo echo
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment