diff options
author | Kim Alvefur <zash@zash.se> | 2021-12-27 17:04:33 +0100 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2021-12-27 17:04:33 +0100 |
commit | 28bd09951595e6bdff02a5b6b9ae59dc595cedcd (patch) | |
tree | b20fe307167c7e51048a759564ffcb63f5840ebc | |
parent | f53f452e471b9f2f91ed0b5bc69a99ca1561a1be (diff) | |
download | prosody-28bd09951595e6bdff02a5b6b9ae59dc595cedcd.tar.gz prosody-28bd09951595e6bdff02a5b6b9ae59dc595cedcd.zip |
mod_admin_shell: Log creation of incoming s2s connections during ping
The 's2s-created' fires just after accepting the TCP connection, before
the addresses are known, so this can have some false positives.
-rw-r--r-- | plugins/mod_admin_shell.lua | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/plugins/mod_admin_shell.lua b/plugins/mod_admin_shell.lua index 0b3c12e6..1f860370 100644 --- a/plugins/mod_admin_shell.lua +++ b/plugins/mod_admin_shell.lua @@ -1396,6 +1396,8 @@ function def_env.xmpp:ping(localhost, remotehost, timeout) local dir = available_columns.dir.mapper(s2s_session.direction, s2s_session); print(("Session %s (%s%s%s) %s (%gs)"):format(s2s_session.id, localhost, dir, remotehost, what, time.now() - time_start)); + elseif s2s_session.type == "s2sin_unauthed" and s2s_session.to_host == nil and s2s_session.from_host == nil then + print(("Session %s %s (%gs)"):format(s2s_session.id, what, time.now() - time_start)); end end end |