Comparison

plugins/mod_s2s/s2sout.lib.lua @ 8902:ac21f13798ae

Merge 0.10->trunk
author Kim Alvefur <zash@zash.se>
date Sat, 09 Jun 2018 15:47:59 +0200
parent 8896:739deb514140
parent 8899:c72a6226ee31
child 8910:28ec1e024379
comparison
equal deleted inserted replaced
8896:739deb514140 8902:ac21f13798ae
28 28
29 local sources = {}; 29 local sources = {};
30 local has_ipv4, has_ipv6; 30 local has_ipv4, has_ipv6;
31 31
32 local dns_timeout = module:get_option_number("dns_timeout", 15); 32 local dns_timeout = module:get_option_number("dns_timeout", 15);
33 dns.settimeout(dns_timeout);
34 local resolvers = module:get_option_set("s2s_dns_resolvers") 33 local resolvers = module:get_option_set("s2s_dns_resolvers")
35 34
36 local s2sout = {}; 35 local s2sout = {};
37 36
38 local s2s_listener; 37 local s2s_listener;
49 function s2sout.initiate_connection(host_session) 48 function s2sout.initiate_connection(host_session)
50 initialize_filters(host_session); 49 initialize_filters(host_session);
51 host_session.version = 1; 50 host_session.version = 1;
52 51
53 host_session.resolver = adns.resolver(); 52 host_session.resolver = adns.resolver();
53 host_session.resolver._resolver:settimeout(dns_timeout);
54 if resolvers then 54 if resolvers then
55 for resolver in resolvers do 55 for resolver in resolvers do
56 host_session.resolver._resolver:addnameserver(resolver); 56 host_session.resolver._resolver:addnameserver(resolver);
57 end 57 end
58 end 58 end