Changeset

1353:a17c2c4043e5

mod_s2s_auth_dane: Hack for domains without SRV
author Kim Alvefur <zash@zash.se>
date Tue, 18 Mar 2014 15:36:23 +0100
parents 1352:b0f780d3a24e
children 1354:93158d5758f3
files mod_s2s_auth_dane/mod_s2s_auth_dane.lua
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mod_s2s_auth_dane/mod_s2s_auth_dane.lua	Tue Mar 18 15:20:28 2014 +0100
+++ b/mod_s2s_auth_dane/mod_s2s_auth_dane.lua	Tue Mar 18 15:36:23 2014 +0100
@@ -88,6 +88,10 @@
 
 local _try_connect = s2sout.try_connect;
 function s2sout.try_connect(host_session, connect_host, connect_port, err)
+	if not host_session.srv_hosts then
+		host_session.srv_hosts = { target = connect_host, port = connect_port };
+		host_session.srv_choice = 1;
+	end
 	if not err and dane_lookup(host_session, _try_connect, host_session, connect_host, connect_port, err) then
 		return true;
 	end