aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CHANGES1
-rw-r--r--plugins/mod_s2s.lua6
2 files changed, 7 insertions, 0 deletions
diff --git a/CHANGES b/CHANGES
index 37c493c6..63c8292d 100644
--- a/CHANGES
+++ b/CHANGES
@@ -55,6 +55,7 @@ TRUNK
- Forwarded header from RFC 7239 supported, disabled by default
- mod_http_file_share now uses roles framework, affecting access from e.g. components
- Intervals of mod_cron managed periodic jobs made configurable
+- When mod_smacks is enabled, s2s connections not responding to ack requests are closed.
## Removed
diff --git a/plugins/mod_s2s.lua b/plugins/mod_s2s.lua
index e7c80ddb..fcdfbca8 100644
--- a/plugins/mod_s2s.lua
+++ b/plugins/mod_s2s.lua
@@ -272,6 +272,12 @@ function module.add_host(module)
end, 100);
module:hook("s2s-authenticated", make_authenticated, -1);
module:hook("s2s-read-timeout", keepalive, -1);
+ module:hook("smacks-ack-delayed", function (event)
+ if event.origin.type == "s2sin" or event.origin.type == "s2sout" then
+ event.origin:close("connection-timeout");
+ return true;
+ end
+ end, -1);
module:hook_stanza("http://etherx.jabber.org/streams", "features", function (session, stanza) -- luacheck: ignore 212/stanza
local limits = stanza:get_child("limits", "urn:xmpp:stream-limits:0");
if limits then