# HG changeset patch # User Kim Alvefur # Date 1713096417 -7200 # Node ID d1b7edf4e2deae98fae84bc4dc163dcf862aff4a # Parent fe7557cf31a696bd12af0eb6b7203699ae85964f 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. diff -r fe7557cf31a6 -r d1b7edf4e2de net/unbound.lua --- a/net/unbound.lua Mon Apr 08 16:44:11 2024 +0200 +++ b/net/unbound.lua Sun Apr 14 14:06:57 2024 +0200 @@ -80,8 +80,12 @@ h = h .. s_format(", Bogus: %s", self.bogus); end local t = { h }; + local qname = self.canonname or self.qname; + if self.canonname then + table.insert(t, self.qname .. "\t" .. classes[self.qclass] .. "\tCNAME\t" .. self.canonname); + end for i = 1, #self do - t[i+1]=self.qname.."\t"..classes[self.qclass].."\t"..types[self.qtype].."\t"..tostring(self[i]); + table.insert(t, qname .. "\t" .. classes[self.qclass] .. "\t" .. types[self.qtype] .. "\t" .. tostring(self[i])); end local _string = t_concat(t, "\n"); self._string = _string;