# HG changeset patch # User Kim Alvefur # Date 1428924998 -7200 # Node ID 7f4c64cfed09fb06f6d6906fb9f2c11a482f4e86 # Parent aac5e56615cef85e68becbde57af27ad7933819c mod_s2s_auth_dane: Abort earlier for sessions from hosts that don't say who they are diff -r aac5e56615ce -r 7f4c64cfed09 mod_s2s_auth_dane/mod_s2s_auth_dane.lua --- a/mod_s2s_auth_dane/mod_s2s_auth_dane.lua Mon Apr 13 13:35:37 2015 +0200 +++ b/mod_s2s_auth_dane/mod_s2s_auth_dane.lua Mon Apr 13 13:36:38 2015 +0200 @@ -68,6 +68,10 @@ if host_session.dane ~= nil then return end -- Has already done a lookup if host_session.direction == "incoming" then + if not host_session.from_host then + module:log("debug", "Session doesn't have a 'from' host set"); + return; + end -- We don't know what hostname or port to use for Incoming connections -- so we do a SRV lookup and then request TLSA records for each SRV -- Most servers will probably use the same certificate on outgoing