Comparison

prosodyctl @ 8924:8fe98e365ab8

prosodyctl: Restrict c2s checks for when c2s is enabled
author Kim Alvefur <zash@zash.se>
date Sat, 23 Jun 2018 17:28:24 +0200
parent 8923:ddd98e262519
child 8948:3be8799263f3
comparison
equal deleted inserted replaced
8923:ddd98e262519 8924:8fe98e365ab8
1037 print("Checking DNS for "..(is_component and "component" or "host").." "..jid.."..."); 1037 print("Checking DNS for "..(is_component and "component" or "host").." "..jid.."...");
1038 if node then 1038 if node then
1039 print("Only the domain part ("..host..") is used in DNS.") 1039 print("Only the domain part ("..host..") is used in DNS.")
1040 end 1040 end
1041 local target_hosts = set.new(); 1041 local target_hosts = set.new();
1042 if not is_component then 1042 if modules:contains("c2s") then
1043 local res = dns.lookup("_xmpp-client._tcp."..idna.to_ascii(host)..".", "SRV"); 1043 local res = dns.lookup("_xmpp-client._tcp."..idna.to_ascii(host)..".", "SRV");
1044 if res then 1044 if res then
1045 for _, record in ipairs(res) do 1045 for _, record in ipairs(res) do
1046 target_hosts:add(record.srv.target); 1046 target_hosts:add(record.srv.target);
1047 if not c2s_ports:contains(record.srv.port) then 1047 if not c2s_ports:contains(record.srv.port) then