Software /
code /
prosody
Comparison
plugins/mod_s2s/s2sout.lib.lua @ 7685:8e43a05e2374
mod_s2s: Log error message from DNS lookup
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Tue, 04 Oct 2016 15:46:24 +0200 |
parent | 7561:ab8324d3b899 |
child | 8267:42fad8465537 |
comparison
equal
deleted
inserted
replaced
7684:65ba769d9f05 | 7685:8e43a05e2374 |
---|---|
174 if reply and reply[#reply] and reply[#reply].a then | 174 if reply and reply[#reply] and reply[#reply].a then |
175 for _, ip in ipairs(reply) do | 175 for _, ip in ipairs(reply) do |
176 log("debug", "DNS reply for %s gives us %s", connect_host, ip.a); | 176 log("debug", "DNS reply for %s gives us %s", connect_host, ip.a); |
177 IPs[#IPs+1] = new_ip(ip.a, "IPv4"); | 177 IPs[#IPs+1] = new_ip(ip.a, "IPv4"); |
178 end | 178 end |
179 elseif err then | |
180 log("debug", "Error in DNS lookup: %s", err); | |
179 end | 181 end |
180 | 182 |
181 if have_other_result then | 183 if have_other_result then |
182 if #IPs > 0 then | 184 if #IPs > 0 then |
183 rfc6724_dest(host_session.ip_hosts, sources); | 185 rfc6724_dest(host_session.ip_hosts, sources); |
210 if reply and reply[#reply] and reply[#reply].aaaa then | 212 if reply and reply[#reply] and reply[#reply].aaaa then |
211 for _, ip in ipairs(reply) do | 213 for _, ip in ipairs(reply) do |
212 log("debug", "DNS reply for %s gives us %s", connect_host, ip.aaaa); | 214 log("debug", "DNS reply for %s gives us %s", connect_host, ip.aaaa); |
213 IPs[#IPs+1] = new_ip(ip.aaaa, "IPv6"); | 215 IPs[#IPs+1] = new_ip(ip.aaaa, "IPv6"); |
214 end | 216 end |
217 elseif err then | |
218 log("debug", "Error in DNS lookup: %s", err); | |
215 end | 219 end |
216 | 220 |
217 if have_other_result then | 221 if have_other_result then |
218 if #IPs > 0 then | 222 if #IPs > 0 then |
219 rfc6724_dest(host_session.ip_hosts, sources); | 223 rfc6724_dest(host_session.ip_hosts, sources); |