Comparison

plugins/mod_s2s/s2sout.lib.lua @ 5552:40e7a6cf15ff

util.rfc{3484,6724}: Update to RFC 6724
author Florian Zeitz <florob@babelmonkeys.de>
date Tue, 30 Apr 2013 18:34:03 +0200
parent 5388:f833d2188c16
child 5700:94081567ea9e
comparison
equal deleted inserted replaced
5550:557583904dc5 5552:40e7a6cf15ff
11 local portmanager = require "core.portmanager"; 11 local portmanager = require "core.portmanager";
12 local wrapclient = require "net.server".wrapclient; 12 local wrapclient = require "net.server".wrapclient;
13 local initialize_filters = require "util.filters".initialize; 13 local initialize_filters = require "util.filters".initialize;
14 local idna_to_ascii = require "util.encodings".idna.to_ascii; 14 local idna_to_ascii = require "util.encodings".idna.to_ascii;
15 local new_ip = require "util.ip".new_ip; 15 local new_ip = require "util.ip".new_ip;
16 local rfc3484_dest = require "util.rfc3484".destination; 16 local rfc6724_dest = require "util.rfc6724".destination;
17 local socket = require "socket"; 17 local socket = require "socket";
18 local adns = require "net.adns"; 18 local adns = require "net.adns";
19 local dns = require "net.dns"; 19 local dns = require "net.dns";
20 local t_insert, t_sort, ipairs = table.insert, table.sort, ipairs; 20 local t_insert, t_sort, ipairs = table.insert, table.sort, ipairs;
21 local st = require "util.stanza"; 21 local st = require "util.stanza";
189 end 189 end
190 end 190 end
191 191
192 if have_other_result then 192 if have_other_result then
193 if #IPs > 0 then 193 if #IPs > 0 then
194 rfc3484_dest(host_session.ip_hosts, sources); 194 rfc6724_dest(host_session.ip_hosts, sources);
195 for i = 1, #IPs do 195 for i = 1, #IPs do
196 IPs[i] = {ip = IPs[i], port = connect_port}; 196 IPs[i] = {ip = IPs[i], port = connect_port};
197 end 197 end
198 host_session.ip_choice = 0; 198 host_session.ip_choice = 0;
199 s2sout.try_next_ip(host_session); 199 s2sout.try_next_ip(host_session);
225 end 225 end
226 end 226 end
227 227
228 if have_other_result then 228 if have_other_result then
229 if #IPs > 0 then 229 if #IPs > 0 then
230 rfc3484_dest(host_session.ip_hosts, sources); 230 rfc6724_dest(host_session.ip_hosts, sources);
231 for i = 1, #IPs do 231 for i = 1, #IPs do
232 IPs[i] = {ip = IPs[i], port = connect_port}; 232 IPs[i] = {ip = IPs[i], port = connect_port};
233 end 233 end
234 host_session.ip_choice = 0; 234 host_session.ip_choice = 0;
235 s2sout.try_next_ip(host_session); 235 s2sout.try_next_ip(host_session);