mod_s2s_auth_dnssec_srv: Fix tb when no hostname sent by remote
authorKim Alvefur <zash@zash.se>
Wed, 19 Mar 2014 19:51:57 +0100
changeset 1363 478b3288192f
parent 1362 920ac9a8480b
child 1364 cc77341af5ee
mod_s2s_auth_dnssec_srv: Fix tb when no hostname sent by remote
mod_s2s_auth_dnssec_srv/mod_s2s_auth_dnssec_srv.lua
--- a/mod_s2s_auth_dnssec_srv/mod_s2s_auth_dnssec_srv.lua	Wed Mar 19 19:48:06 2014 +0100
+++ b/mod_s2s_auth_dnssec_srv/mod_s2s_auth_dnssec_srv.lua	Wed Mar 19 19:51:57 2014 +0100
@@ -40,7 +40,7 @@
 function module.add_host(module)
 	module:hook("s2s-stream-features", function(event)
 		local host_session = event.origin;
-		local name = to_ascii(host_session.from_host);
+		local name = host_session.from_host and to_ascii(host_session.from_host);
 		if not name then return end
 		dns_lookup(function (answer)
 			if host_session.dane ~= nil then return end