mod_s2s: Prevent traceback when replying to incoming connection to a host we don't serve
authorKim Alvefur <zash@zash.se>
Tue, 26 Mar 2013 09:25:20 +0100
changeset 5389 d147a4227a72
parent 5388 f833d2188c16
child 5390 b3c8757ee4f4
mod_s2s: Prevent traceback when replying to incoming connection to a host we don't serve
plugins/mod_s2s/mod_s2s.lua
--- a/plugins/mod_s2s/mod_s2s.lua	Mon Mar 25 19:08:15 2013 +0100
+++ b/plugins/mod_s2s/mod_s2s.lua	Tue Mar 26 09:25:20 2013 +0100
@@ -486,7 +486,7 @@
 		from = from, to = to,
 	}
 	local local_host = session.direction == "outgoing" and from or to;
-	if not local_host or hosts[local_host].modules.dialback then
+	if not local_host or (hosts[local_host] and hosts[local_host].modules.dialback) then
 		attr["xmlns:db"] = 'jabber:server:dialback';
 	end