diff options
author | Kim Alvefur <zash@zash.se> | 2020-10-03 15:09:12 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2020-10-03 15:09:12 +0200 |
commit | 7eb15b0b3fd49a58656e510866349c9725cd27cc (patch) | |
tree | f5bc0b1c03d7a9d503120208842a775ad5f6b3f2 /plugins/mod_bosh.lua | |
parent | 438de6e045953d51c42d03c82f423d93d9591b89 (diff) | |
download | prosody-7eb15b0b3fd49a58656e510866349c9725cd27cc.tar.gz prosody-7eb15b0b3fd49a58656e510866349c9725cd27cc.zip |
mod_bosh: Count connection attempts non-VirtualHost as "bad host" (stats)
Diffstat (limited to 'plugins/mod_bosh.lua')
-rw-r--r-- | plugins/mod_bosh.lua | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/plugins/mod_bosh.lua b/plugins/mod_bosh.lua index c5f5e044..6393a73e 100644 --- a/plugins/mod_bosh.lua +++ b/plugins/mod_bosh.lua @@ -293,6 +293,7 @@ function stream_callbacks.streamopened(context, attr) 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 @@ function stream_callbacks.streamopened(context, attr) 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)); |