comparison net/unbound.lua @ 13479:d1b7edf4e2de

net.unbound: Show canonical name in textual format (e.g. in shell) libunbound does not tell us the whole chain of CNAMEs, only the final canonical name. This is to aid in debugging since it will only be shown in the shell.
author Kim Alvefur <zash@zash.se>
date Sun, 14 Apr 2024 14:06:57 +0200
parents ba409c67353b
children 5abdcad8c2e0
comparison
equal deleted inserted replaced
13478:fe7557cf31a6 13479:d1b7edf4e2de
78 h = h .. ", Secure"; 78 h = h .. ", Secure";
79 elseif self.bogus then 79 elseif self.bogus then
80 h = h .. s_format(", Bogus: %s", self.bogus); 80 h = h .. s_format(", Bogus: %s", self.bogus);
81 end 81 end
82 local t = { h }; 82 local t = { h };
83 local qname = self.canonname or self.qname;
84 if self.canonname then
85 table.insert(t, self.qname .. "\t" .. classes[self.qclass] .. "\tCNAME\t" .. self.canonname);
86 end
83 for i = 1, #self do 87 for i = 1, #self do
84 t[i+1]=self.qname.."\t"..classes[self.qclass].."\t"..types[self.qtype].."\t"..tostring(self[i]); 88 table.insert(t, qname .. "\t" .. classes[self.qclass] .. "\t" .. types[self.qtype] .. "\t" .. tostring(self[i]));
85 end 89 end
86 local _string = t_concat(t, "\n"); 90 local _string = t_concat(t, "\n");
87 self._string = _string; 91 self._string = _string;
88 return _string; 92 return _string;
89 end; 93 end;