mod_s2s: Close s2s connections that can not proceed due to mod_dialback not being...
authorKim Alvefur <zash@zash.se>
Tue, 23 Sep 2014 17:41:10 +0000 (19:41 +0200)
committerKim Alvefur <zash@zash.se>
Tue, 23 Sep 2014 17:41:10 +0000 (19:41 +0200)
plugins/mod_s2s/mod_s2s.lua

index 7ff921d927dc415639fb7afc5295f97b0bdf9ea4..a50387fb4cb5921193b5124b549956246bafef38 100644 (file)
@@ -154,6 +154,10 @@ function module.add_host(module)
                        -- so the stream is ready for stanzas.  RFC 6120 Section 4.3
                        mark_connected(session);
                        return true;
+               elseif not session.dialback_verifying then
+                       session.log("warn", "No SASL EXTERNAL offer and Dialback doesn't seem to be enabled, giving up");
+                       session:close();
+                       return false;
                end
        end, -1);
 end