Browse Source

Don't hard code deb.roundr.devuan.org all over the place, and check the results.

Coz it got changed to deb.rr.devuan.org.
master
onefang 9 months ago
parent
commit
fe8fc1dee0
  1. 6
      apt-panopticommon.lua
  2. 35
      apt-panopticon-report-email-web.lua
  3. 7
      apt-panopticon.lua

6
apt-panopticommon.lua

@ -53,6 +53,12 @@ APT.options =
help = "The round robin DNS name.",
value = "deb.devuan.org",
},
roundRobinCname =
{
typ = "string",
help = "The round robin DNS name.",
value = "deb.rr.devuan.org",
},
tests =
{
typ = "table",

35
apt-panopticon-report-email-web.lua

@ -18,11 +18,13 @@ APT.debians = loadfile("results/debians.lua")()
local revDNS = function(hosts, dom, IP)
if APT.options.roundRobin.value ~= dom then
if nil ~= hosts[APT.options.roundRobin.value] then
if nil ~= hosts[APT.options.roundRobin.value].IPs["deb.roundr.devuan.org"][IP] then
if APT.html then
return "<font color='purple'><b>DNS-RR</b></font>"
else
return "DNS-RR"
if nil ~= hosts[APT.options.roundRobin.value].IPs[APT.options.roundRobinCname] then
if nil ~= hosts[APT.options.roundRobin.value].IPs[APT.options.roundRobinCname][IP] then
if APT.html then
return "<font color='purple'><b>DNS-RR</b></font>"
else
return "DNS-RR"
end
end
end
end
@ -201,15 +203,17 @@ local DNSrrTest = function(hosts, k)
if (APT.options.roundRobin.value ~= k) and (nil ~= hosts[APT.options.roundRobin.value]) and (nil ~= hosts[k].IPs) then
APT.allpairs(hosts[k].IPs,
function(i, w, k, v)
if nil ~= hosts[APT.options.roundRobin.value].IPs["deb.roundr.devuan.org"][i] then
local log = logCount(APT.options.roundRobin.value, i)
if "" ~= log then
if "" == dns then dns = " " else dns = dns .. space end
dns = dns .. logCount(APT.options.roundRobin.value, i)
else
if "" == dns then dns = " " else dns = dns .. space end
if APT.html then i = "<font color='maroon'><b>" .. i .. "</b></font>" end
dns = dns .. i
if nil ~= hosts[APT.options.roundRobin.value].IPs[APT.options.roundRobinCname] then
if nil ~= hosts[APT.options.roundRobin.value].IPs[APT.options.roundRobinCname][i] then
local log = logCount(APT.options.roundRobin.value, i)
if "" ~= log then
if "" == dns then dns = " " else dns = dns .. space end
dns = dns .. logCount(APT.options.roundRobin.value, i)
else
if "" == dns then dns = " " else dns = dns .. space end
if APT.html then i = "<font color='maroon'><b>" .. i .. "</b></font>" end
dns = dns .. i
end
end
end
end
@ -360,9 +364,8 @@ local makeIPlist = function(hosts)
if nil ~= hosts[k].IPs then
for l, w in pairs(hosts[k].IPs) do
if type(w) == "table" then
-- TODO - don't hard code deb.roundr.devuan.org.
-- Don't output the extra DNS-RR entries that are for admin reasons.
if ((APT.options.roundRobin.value == k) and ("deb.roundr.devuan.org" == l)) or (APT.options.roundRobin.value ~= k) then
if ((APT.options.roundRobin.value == k) and (APT.options.roundRobinCname == l)) or (APT.options.roundRobin.value ~= k) then
n[l] = {}
for i, u in pairs(w) do
if (APT.testing("IPv6") and ("AAAA" == u)) or ("A" == u) then

7
apt-panopticon.lua

@ -199,11 +199,11 @@ gatherIPs = function (host)
gatherIPs(m.FQDN)
IP[host][m.FQDN] = IP[m.FQDN]
-- Strip them out so we don't test them twice.
if nil ~= IP[m.FQDN] then
if (nil ~= IP[m.FQDN]) and (nil ~= IP[host][APT.options.roundRobinCname]) then
for l, n in pairs(IP[m.FQDN]) do
if type(n) == 'table' then
for h, p in pairs(n) do
for j, o in pairs(IP[host]['deb.roundr.devuan.org']) do
for j, o in pairs(IP[host][APT.options.roundRobinCname]) do
if h == j then IP[host][m.FQDN][l][h] = nil end
end
o = 0
@ -211,7 +211,7 @@ gatherIPs = function (host)
if 0 == o then IP[host][m.FQDN][l] = nil end
end
else
for j, o in pairs(IP[host]['deb.roundr.devuan.org']) do
for j, o in pairs(IP[host][APT.options.roundRobinCname]) do
if l == j then IP[host][m.FQDN][l] = nil end
end
end
@ -1009,6 +1009,7 @@ os.execute('sleep 1') -- Wait for things to start up before checking for them.
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* Connected to devuan.bio.lmu.de (141.84.43.19) port 80 (#0)
curl: (22) The requested URL returned error: 404 Not Found
]]
local trace = {}
local min, max, spd = 999999999999, 0
local num = '[%d%.]+[kM]?'
if APT.checkFile(f) then

Loading…
Cancel
Save