Changeset

5387:1130887e0d41

mod_s2s: session.from_host does not allways exist on incoming connections, true and nil or "our hostname" does not evaluate to what we want here
author Kim Alvefur <zash@zash.se>
date Mon, 25 Mar 2013 08:18:49 +0100
parents 5386:43059357b2f0
children 5388:f833d2188c16
files plugins/mod_s2s/mod_s2s.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/mod_s2s/mod_s2s.lua	Sat Mar 23 23:30:13 2013 +0100
+++ b/plugins/mod_s2s/mod_s2s.lua	Mon Mar 25 08:18:49 2013 +0100
@@ -211,7 +211,7 @@
 
 --- Helper to check that a session peer's certificate is valid
 local function check_cert_status(session)
-	local host = session.direction == "incoming" and session.from_host or session.to_host
+	local host = session.direction == "outgoing" and session.to_host or session.from_host
 	local conn = session.conn:socket()
 	local cert
 	if conn.getpeercertificate then