mirror of
https://github.com/bjc/prosody.git
synced 2025-04-04 13:47:41 +03:00
net.dns: Don't compress a single zero group in IPv6 addresses to match behaviour of inet_ntop
This commit is contained in:
parent
5485202439
commit
066b90ccff
1 changed files with 1 additions and 1 deletions
|
@ -390,7 +390,7 @@ function resolver:AAAA(rr)
|
||||||
end
|
end
|
||||||
addr = table.concat(addr, ":"):gsub("%f[%x]0+(%x)","%1");
|
addr = table.concat(addr, ":"):gsub("%f[%x]0+(%x)","%1");
|
||||||
local zeros = {};
|
local zeros = {};
|
||||||
for item in addr:gmatch(":[0:]+:") do
|
for item in addr:gmatch(":[0:]+:[0:]+:") do
|
||||||
table.insert(zeros, item)
|
table.insert(zeros, item)
|
||||||
end
|
end
|
||||||
if #zeros == 0 then
|
if #zeros == 0 then
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue