# HG changeset patch # User Kim Alvefur # Date 1601730552 -7200 # Node ID cc6b1dab01a2236ba8af6b5309554cc14cc4bad2 # Parent 5bcddab1659bdb37746ad5dba30cc413cd709451 mod_bosh: Count connection attempts non-VirtualHost as "bad host" (stats) diff -r 5bcddab1659b -r cc6b1dab01a2 plugins/mod_bosh.lua --- a/plugins/mod_bosh.lua Sat Oct 03 15:07:48 2020 +0200 +++ b/plugins/mod_bosh.lua Sat Oct 03 15:09:12 2020 +0200 @@ -293,6 +293,7 @@ if not prosody.hosts[to_host] then log("debug", "BOSH client tried to connect to non-existant host: %s", attr.to); + report_bad_host(); local close_reply = st.stanza("body", { xmlns = xmlns_bosh, type = "terminate", ["xmlns:stream"] = xmlns_streams, condition = "improper-addressing" }); response:send(tostring(close_reply)); @@ -301,6 +302,7 @@ if prosody.hosts[to_host].type ~= "local" then log("debug", "BOSH client tried to connect to %s host: %s", prosody.hosts[to_host].type, attr.to); + report_bad_host(); local close_reply = st.stanza("body", { xmlns = xmlns_bosh, type = "terminate", ["xmlns:stream"] = xmlns_streams, condition = "improper-addressing" }); response:send(tostring(close_reply));