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 | 43d3c3ab81aaaad157050c7ae7690551d0d4dec0 (patch) | |
tree | f5bc0b1c03d7a9d503120208842a775ad5f6b3f2 /plugins | |
parent | 504113c26ec239039eb7d86988cda1d6ebd2826b (diff) | |
download | prosody-43d3c3ab81aaaad157050c7ae7690551d0d4dec0.tar.gz prosody-43d3c3ab81aaaad157050c7ae7690551d0d4dec0.zip |
mod_bosh: Count connection attempts non-VirtualHost as "bad host" (stats)
Diffstat (limited to 'plugins')
-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)); |