# HG changeset patch # User Kim Alvefur # Date 1539354330 -7200 # Node ID 4ac3103787cc7a728bb65e2215fc8bf0b2a64ed0 # Parent 89e05b118f6e38aa0b5282b64f074c9f6bb9ca22 net.resolvers.basic: Suffix IPv4 TCP socket types with '4' to match eg 'tcp6' diff -r 89e05b118f6e -r 4ac3103787cc net/resolvers/basic.lua --- a/net/resolvers/basic.lua Fri Oct 12 16:24:49 2018 +0200 +++ b/net/resolvers/basic.lua Fri Oct 12 16:25:30 2018 +0200 @@ -31,7 +31,7 @@ if #is_ip == 16 then cb(self.conn_type.."6", self.hostname, self.port, self.extra); elseif #is_ip == 4 then - cb(self.conn_type, self.hostname, self.port, self.extra); + cb(self.conn_type.."4", self.hostname, self.port, self.extra); end return; end @@ -41,7 +41,7 @@ dns_resolver:lookup(function (answer) if answer then for _, record in ipairs(answer) do - table.insert(targets, { self.conn_type, record.a, self.port, self.extra }); + table.insert(targets, { self.conn_type.."4", record.a, self.port, self.extra }); end end ready();