diff options
Diffstat (limited to 'net')
-rw-r--r-- | net/dns.lua | 10 | ||||
-rw-r--r-- | net/server_select.lua | 1 |
2 files changed, 10 insertions, 1 deletions
diff --git a/net/dns.lua b/net/dns.lua index c905f56c..3f1cb4f6 100644 --- a/net/dns.lua +++ b/net/dns.lua @@ -389,6 +389,14 @@ function resolver:A(rr) -- - - - - - - - - - - - - - - - - - - - - - - - A rr.a = string.format('%i.%i.%i.%i', b1, b2, b3, b4); end +function resolver:AAAA(rr) + local addr = {}; + for i = 1, rr.rdlength, 2 do + local b1, b2 = self:byte(2); + table.insert(addr, ("%02x%02x"):format(b1, b2)); + end + rr.aaaa = table.concat(addr, ":"); +end function resolver:CNAME(rr) -- - - - - - - - - - - - - - - - - - - - CNAME rr.cname = self:name(); @@ -479,7 +487,7 @@ function resolver:PTR(rr) end function resolver:TXT(rr) -- - - - - - - - - - - - - - - - - - - - - - TXT - rr.txt = self:sub (rr.rdlength); + rr.txt = self:sub (self:byte()); end diff --git a/net/server_select.lua b/net/server_select.lua index c3777a5f..13a910f8 100644 --- a/net/server_select.lua +++ b/net/server_select.lua @@ -939,6 +939,7 @@ return { loop = loop, link = link, + step = step, stats = stats, closeall = closeall, addtimer = addtimer, |