From 03b9b8ae2a9eed23636bd53ab1f6f5a3b483cebd Mon Sep 17 00:00:00 2001 From: onefang Date: Mon, 1 Jun 2020 19:08:31 +1000 Subject: Try to figure outn what IPs should and should not be in the DNS-RR. --- apt-panopticon-report-email-web.lua | 28 +++++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-) diff --git a/apt-panopticon-report-email-web.lua b/apt-panopticon-report-email-web.lua index 3f80d03..9894de7 100755 --- a/apt-panopticon-report-email-web.lua +++ b/apt-panopticon-report-email-web.lua @@ -309,6 +309,7 @@ end local makeIPlist = function(hosts) local m = {} local adr = '' + local checkRR = hosts == APT.mirrors; if APT.options.cgi.value then adr = 'php.cgi/' end adr = '/' .. adr .. 'apt-panopticon/apt-panopticon_cgp/host.php?h=' for k, v in pairs(hosts) do @@ -328,12 +329,26 @@ local makeIPlist = function(hosts) if type(w) == "table" then n[l] = {} for i, u in pairs(w) do - local log = '[graphs] ' .. logCount(k, i) - if "" == log then n[l][i] = u else n[l][log .. " " .. revDNS(hosts, k, i)] = u end + local inRR = "" + local lc = logCount(k, i) + if checkRR then + -- If there where errors, warnings, or timeouts, then it'll have that wrapped in font tags. + inRR = "✅" + if nil ~= lc:find("❌" end + end + local log = '[graphs] ' + if "" == log then n[l][i] = u else n[l][log .. inRR .. ' ' .. revDNS(hosts, k, i) .. ' ' .. lc] = u end end else - local log = '[graphs] ' .. logCount(k, l) - if "" == log then n[l] = w else n[log .. " " .. revDNS(hosts, k, l)] = w end + local inRR = "" + local lc = logCount(k, l) + if checkRR then + -- If there where errors, warnings, or timeouts, then it'll have that wrapped in font tags. + inRR = "✅" + if nil ~= lc:find("❌" end + end + local log = '[graphs] ' + if "" == log then n[l] = w else n[log .. inRR .. ' ' .. revDNS(hosts, k, l) .. ' ' .. lc] = w end end end end @@ -488,8 +503,11 @@ if nil == web then C("opening mirrors file - " .. e) else web:write( "
This lists each mirror, and the DNS entries for that mirror. " ..
"The IP links point to the testing log files (the overall log is " .. logCount("apt-panopticon") .. ") for each domain name / IP combination that was tested. " ..
"If a mirror has a CNAME, that CNAME is listed along with that CNAMEs DNS entries. " ..
+ "
" ..
APT.options.roundRobin.value .. " is the DNS round robin, which points to the mirrors that are part of the DNS-RR. " ..
- "If an IP is part of the DNS-RR, it is marked with 'DNS-RR' " ..
+ "If an IP is part of the DNS-RR, it is marked with 'DNS-RR'," ..
+ " if it should be it is marked with '✅', if it should not be it is marked with '❌'. " ..
+ "
" ..
APT.options.referenceSite.value .. " is the master mirror, all the others copy files from it. " ..
"