From 0c03bf0cf20ac424e8aff5999945ec1d3fc2fea0 Mon Sep 17 00:00:00 2001 From: onefang Date: Sun, 24 Nov 2019 05:55:45 +1000 Subject: Mark DNS entries that are in DNS-RR. --- apt-panopticon-report-web.lua | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/apt-panopticon-report-web.lua b/apt-panopticon-report-web.lua index f17bf54..33b8fe2 100755 --- a/apt-panopticon-report-web.lua +++ b/apt-panopticon-report-web.lua @@ -124,17 +124,22 @@ local C = function(s) log(-1, "CRITICAL", s) end local mirrors = loadfile("results/mirrors.lua")() local revDNS = function(dom, IP) - if "deb.devuan.org" ~= dom then return "" end - for k, v in pairs(mirrors) do - if "deb.devuan.org" ~= k then - local IPs = v.IPs - for i, u in pairs(IPs) do - if "table" == type(u) then - for h, t in pairs(u) do - if IP == h then return k end + if "deb.devuan.org" ~= dom then + if nil ~= mirrors["deb.devuan.org"].IPs["deb.roundr.devuan.org"][IP] then + return "DNS-RR" + end + else + for k, v in pairs(mirrors) do + if "deb.devuan.org" ~= k then + local IPs = v.IPs + for i, u in pairs(IPs) do + if "table" == type(u) then + for h, t in pairs(u) do + if IP == h then return k end + end + else + if IP == i then return k end end - else - if IP == i then return k end end end end -- cgit v1.1