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
commit8e6092d58a22c88cd97c15b6cefe60de8a53d307 (patch)
tree12f893e8bf7c065b474cf64dee4d247714417e9d
parent5b30abd00062c7634d80596b196176b9b6e7e1c7 (diff)
downloadprosody-8e6092d58a22c88cd97c15b6cefe60de8a53d307.tar.gz
prosody-8e6092d58a22c88cd97c15b6cefe60de8a53d307.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