aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authoronefang2021-11-19 23:39:52 +1000
committeronefang2021-11-19 23:39:52 +1000
commit503e0627af583e36f5581a630140c360bde58061 (patch)
tree123788beb536884f40acf45f423cad8cd0c7bf31
parentBump to version 0.3 and report it in the web page. (diff)
downloadapt-panopticon-503e0627af583e36f5581a630140c360bde58061.zip
apt-panopticon-503e0627af583e36f5581a630140c360bde58061.tar.gz
apt-panopticon-503e0627af583e36f5581a630140c360bde58061.tar.bz2
apt-panopticon-503e0627af583e36f5581a630140c360bde58061.tar.xz
Strip out DNS-RR duplicates.
-rwxr-xr-xapt-panopticon.lua20
1 files changed, 20 insertions, 0 deletions
diff --git a/apt-panopticon.lua b/apt-panopticon.lua
index 7e3b4ef..7defaad 100755
--- a/apt-panopticon.lua
+++ b/apt-panopticon.lua
@@ -198,6 +198,26 @@ gatherIPs = function (host)
198 if "yes" == m.DNSRR then 198 if "yes" == m.DNSRR then
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.
202 for l, n in pairs(IP[m.FQDN]) do
203 if type(n) == 'table' then
204 for h, p in pairs(n) do
205 for j, o in pairs(IP[host]['deb.roundr.devuan.org']) do
206 if h == j then IP[host][m.FQDN][l][h] = nil end
207 end
208 o = 0
209 for j in pairs(IP[host][m.FQDN][l]) do o = o + 1 end
210 if 0 == o then IP[host][m.FQDN][l] = nil end
211 end
212 else
213 for j, o in pairs(IP[host]['deb.roundr.devuan.org']) do
214 if l == j then IP[host][m.FQDN][l] = nil end
215 end
216 end
217 o = 0
218 for j in pairs(IP[host][m.FQDN]) do o = o + 1 end
219 if 0 == o then IP[host][m.FQDN] = nil end
220 end
201 end 221 end
202 end 222 end
203 end 223 end