diff options
author | Kim Alvefur <zash@zash.se> | 2019-11-24 04:46:36 +0100 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2019-11-24 04:46:36 +0100 |
commit | e7c738ba3f21dce52cf4efe1bd0bbb7393d099cd (patch) | |
tree | fd40e64f686adc0cd351be4d34293fb96087e596 /net/resolvers | |
parent | 378673b456a6b0dbf228324d6f030f3cb7ddfebc (diff) | |
parent | d9c64e1f412ce232e44eac499f006292d8cc720b (diff) | |
download | prosody-e7c738ba3f21dce52cf4efe1bd0bbb7393d099cd.tar.gz prosody-e7c738ba3f21dce52cf4efe1bd0bbb7393d099cd.zip |
Merge 0.11->trunk
Diffstat (limited to 'net/resolvers')
-rw-r--r-- | net/resolvers/basic.lua | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/net/resolvers/basic.lua b/net/resolvers/basic.lua index 147d2858..c1931dab 100644 --- a/net/resolvers/basic.lua +++ b/net/resolvers/basic.lua @@ -1,5 +1,6 @@ local adns = require "net.adns"; local inet_pton = require "util.net".pton; +local inet_ntop = require "util.net".ntop; local idna_to_ascii = require "util.encodings".idna.to_ascii; local unpack = table.unpack or unpack; -- luacheck: ignore 113 @@ -64,6 +65,7 @@ local function new(hostname, port, conn_type, extra) is_ip = inet_pton(hostname:sub(2,-2)); end if is_ip then + hostname = inet_ntop(is_ip); if #is_ip == 16 then targets = { { conn_type.."6", hostname, port, extra } }; elseif #is_ip == 4 then |