using <pre>[dns::resolve AN_IPv6_ADDRESS]</pre> currently leads to an error.<br>

this patch against below makes it work for me:

<pre>
--- dns.tcl.orig	Thu Jun 13 12:34:10 2019
+++ dns.tcl	Thu Jun 13 12:38:02 2019
@@ -286,10 +286,17 @@
         }
     }

-    # Check for reverse lookups
+    # Check for reverse lookups, IPv4 first, then IPv6
     if {[regexp $state(query)]} {
         set addr [lreverse [split $state(query) .]]
         lappend addr in-addr arpa
+        set state(query) [join $addr .]
+        set state(-type) PTR
+    } elseif {[string match {*:*} $state(query)]} {
+        set addr [ip::normalize $state(query)]
+        set addr [split [string reverse $addr] :]
+        set addr [join [split [join $addr ""] {}] .]
+        lappend addr ip6 arpa
         set state(query) [join $addr .]
         set state(-type) PTR
     }

</pre>

similarily to checking if we got an IPv4 address, check if the query contains a colon. Checking if it contains a colon should be sufficient, since IPv4 addresses don't contain colons, as well as they are not allowed in hostnames.

Once an IPv6 address is identified, normalize it, and format the query appropriately.