aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2017-12-01 04:50:20 +0100
committerKim Alvefur <zash@zash.se>2017-12-01 04:50:20 +0100
commit066b90ccffc05ecc98df624c7b8a1a97ae526dc9 (patch)
tree12f893e8bf7c065b474cf64dee4d247714417e9d
parent548520243970753f04199de1ff8dae3f8c3cfd1a (diff)
downloadprosody-066b90ccffc05ecc98df624c7b8a1a97ae526dc9.tar.gz
prosody-066b90ccffc05ecc98df624c7b8a1a97ae526dc9.zip
net.dns: Don't compress a single zero group in IPv6 addresses to match behaviour of inet_ntop
-rw-r--r--net/dns.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/dns.lua b/net/dns.lua
index 5ba3db0e..eba2b5a0 100644
--- a/net/dns.lua
+++ b/net/dns.lua
@@ -390,7 +390,7 @@ function resolver:AAAA(rr)
end
addr = table.concat(addr, ":"):gsub("%f[%x]0+(%x)","%1");
local zeros = {};
- for item in addr:gmatch(":[0:]+:") do
+ for item in addr:gmatch(":[0:]+:[0:]+:") do
table.insert(zeros, item)
end
if #zeros == 0 then