Mercurial > prosody-modules
comparison mod_s2s_auth_dane/mod_s2s_auth_dane.lua @ 1337:c38f163f18b9
mod_s2s_auth_dane: Fix inverted nil check
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sun, 09 Mar 2014 14:09:24 +0100 |
parents | ae0558230e3d |
children | eca8c480891e |
comparison
equal
deleted
inserted
replaced
1336:ae0558230e3d | 1337:c38f163f18b9 |
---|---|
128 | 128 |
129 -- DANE for s2sin | 129 -- DANE for s2sin |
130 -- Looks for TLSA at the same QNAME as the SRV record | 130 -- Looks for TLSA at the same QNAME as the SRV record |
131 module:hook("s2s-stream-features", function(event) | 131 module:hook("s2s-stream-features", function(event) |
132 local origin = event.origin; | 132 local origin = event.origin; |
133 if not origin.from_host or origin.dane == nil then return end | 133 if not origin.from_host or origin.dane ~= nil then return end |
134 | 134 |
135 origin.dane = dns_lookup(function(answer) | 135 origin.dane = dns_lookup(function(answer) |
136 if answer and ( #answer > 0 or answer.bogus ) then | 136 if answer and ( #answer > 0 or answer.bogus ) then |
137 origin.dane = answer; | 137 origin.dane = answer; |
138 else | 138 else |