diff options
author | onefang | 2021-12-18 00:07:00 +1000 |
---|---|---|
committer | onefang | 2021-12-18 00:07:00 +1000 |
commit | 767456506b04ab6e11cdd74e59195059be508904 (patch) | |
tree | c81cd48ae54c8de12c44e4c3d8358b783bbf4753 | |
parent | Don't hard code deb.roundr.devuan.org all over the place, and check the results. (diff) | |
download | apt-panopticon-767456506b04ab6e11cdd74e59195059be508904.zip apt-panopticon-767456506b04ab6e11cdd74e59195059be508904.tar.gz apt-panopticon-767456506b04ab6e11cdd74e59195059be508904.tar.bz2 apt-panopticon-767456506b04ab6e11cdd74e59195059be508904.tar.xz |
Oops, use .value for the actual, you know, value.
-rwxr-xr-x | apt-panopticon-report-email-web.lua | 10 | ||||
-rwxr-xr-x | apt-panopticon.lua | 6 |
2 files changed, 8 insertions, 8 deletions
diff --git a/apt-panopticon-report-email-web.lua b/apt-panopticon-report-email-web.lua index 73e0338..dd8cff6 100755 --- a/apt-panopticon-report-email-web.lua +++ b/apt-panopticon-report-email-web.lua | |||
@@ -18,8 +18,8 @@ APT.debians = loadfile("results/debians.lua")() | |||
18 | local revDNS = function(hosts, dom, IP) | 18 | local revDNS = function(hosts, dom, IP) |
19 | if APT.options.roundRobin.value ~= dom then | 19 | if APT.options.roundRobin.value ~= dom then |
20 | if nil ~= hosts[APT.options.roundRobin.value] then | 20 | if nil ~= hosts[APT.options.roundRobin.value] then |
21 | if nil ~= hosts[APT.options.roundRobin.value].IPs[APT.options.roundRobinCname] then | 21 | if nil ~= hosts[APT.options.roundRobin.value].IPs[APT.options.roundRobinCname.value] then |
22 | if nil ~= hosts[APT.options.roundRobin.value].IPs[APT.options.roundRobinCname][IP] then | 22 | if nil ~= hosts[APT.options.roundRobin.value].IPs[APT.options.roundRobinCname.value][IP] then |
23 | if APT.html then | 23 | if APT.html then |
24 | return "<font color='purple'><b>DNS-RR</b></font>" | 24 | return "<font color='purple'><b>DNS-RR</b></font>" |
25 | else | 25 | else |
@@ -203,8 +203,8 @@ local DNSrrTest = function(hosts, k) | |||
203 | if (APT.options.roundRobin.value ~= k) and (nil ~= hosts[APT.options.roundRobin.value]) and (nil ~= hosts[k].IPs) then | 203 | if (APT.options.roundRobin.value ~= k) and (nil ~= hosts[APT.options.roundRobin.value]) and (nil ~= hosts[k].IPs) then |
204 | APT.allpairs(hosts[k].IPs, | 204 | APT.allpairs(hosts[k].IPs, |
205 | function(i, w, k, v) | 205 | function(i, w, k, v) |
206 | if nil ~= hosts[APT.options.roundRobin.value].IPs[APT.options.roundRobinCname] then | 206 | if nil ~= hosts[APT.options.roundRobin.value].IPs[APT.options.roundRobinCname.value] then |
207 | if nil ~= hosts[APT.options.roundRobin.value].IPs[APT.options.roundRobinCname][i] then | 207 | if nil ~= hosts[APT.options.roundRobin.value].IPs[APT.options.roundRobinCname.value][i] then |
208 | local log = logCount(APT.options.roundRobin.value, i) | 208 | local log = logCount(APT.options.roundRobin.value, i) |
209 | if "" ~= log then | 209 | if "" ~= log then |
210 | if "" == dns then dns = " " else dns = dns .. space end | 210 | if "" == dns then dns = " " else dns = dns .. space end |
@@ -365,7 +365,7 @@ local makeIPlist = function(hosts) | |||
365 | for l, w in pairs(hosts[k].IPs) do | 365 | for l, w in pairs(hosts[k].IPs) do |
366 | if type(w) == "table" then | 366 | if type(w) == "table" then |
367 | -- Don't output the extra DNS-RR entries that are for admin reasons. | 367 | -- Don't output the extra DNS-RR entries that are for admin reasons. |
368 | if ((APT.options.roundRobin.value == k) and (APT.options.roundRobinCname == l)) or (APT.options.roundRobin.value ~= k) then | 368 | if ((APT.options.roundRobin.value == k) and (APT.options.roundRobinCname.value == l)) or (APT.options.roundRobin.value ~= k) then |
369 | n[l] = {} | 369 | n[l] = {} |
370 | for i, u in pairs(w) do | 370 | for i, u in pairs(w) do |
371 | if (APT.testing("IPv6") and ("AAAA" == u)) or ("A" == u) then | 371 | if (APT.testing("IPv6") and ("AAAA" == u)) or ("A" == u) then |
diff --git a/apt-panopticon.lua b/apt-panopticon.lua index 1a00fc7..7d08f7d 100755 --- a/apt-panopticon.lua +++ b/apt-panopticon.lua | |||
@@ -199,11 +199,11 @@ gatherIPs = function (host) | |||
199 | gatherIPs(m.FQDN) | 199 | gatherIPs(m.FQDN) |
200 | IP[host][m.FQDN] = IP[m.FQDN] | 200 | IP[host][m.FQDN] = IP[m.FQDN] |
201 | -- Strip them out so we don't test them twice. | 201 | -- Strip them out so we don't test them twice. |
202 | if (nil ~= IP[m.FQDN]) and (nil ~= IP[host][APT.options.roundRobinCname]) then | 202 | if (nil ~= IP[m.FQDN]) and (nil ~= IP[host][APT.options.roundRobinCname.value]) then |
203 | for l, n in pairs(IP[m.FQDN]) do | 203 | for l, n in pairs(IP[m.FQDN]) do |
204 | if type(n) == 'table' then | 204 | if type(n) == 'table' then |
205 | for h, p in pairs(n) do | 205 | for h, p in pairs(n) do |
206 | for j, o in pairs(IP[host][APT.options.roundRobinCname]) do | 206 | for j, o in pairs(IP[host][APT.options.roundRobinCname.value]) do |
207 | if h == j then IP[host][m.FQDN][l][h] = nil end | 207 | if h == j then IP[host][m.FQDN][l][h] = nil end |
208 | end | 208 | end |
209 | o = 0 | 209 | o = 0 |
@@ -211,7 +211,7 @@ gatherIPs = function (host) | |||
211 | if 0 == o then IP[host][m.FQDN][l] = nil end | 211 | if 0 == o then IP[host][m.FQDN][l] = nil end |
212 | end | 212 | end |
213 | else | 213 | else |
214 | for j, o in pairs(IP[host][APT.options.roundRobinCname]) do | 214 | for j, o in pairs(IP[host][APT.options.roundRobinCname.value]) do |
215 | if l == j then IP[host][m.FQDN][l] = nil end | 215 | if l == j then IP[host][m.FQDN][l] = nil end |
216 | end | 216 | end |
217 | end | 217 | end |