Kim Alvefur
814817ebf2
core.s2smanager: Don't remove unrelated session on close of bidi session
...
Normally with bidi, any outgoing connection should be the same as the
incoming, hence when closing a bidi connection it should be removed as a
route to the remote server. However it is not guaranteed, a remote bidi-capable server
might have decided to open a new connection for some reason. This can
lead to a situation where there are two bidi connections, and the s2sout
route is a locally initiated s2sout connection. In this case, such a
s2sout connection should be kept.
Noticed in a rare case where bidi has just been enabled on a running
server, and something establishes new connections immediately when a
connection is closed.
4 years ago
Kim Alvefur
d47a7bb3bd
core: Prefix module imports with prosody namespace
3 years ago
Matthew Wild
30ef01a6cc
s2smanager: Fire s2s-destroyed event to mirror s2s-created
...
The existing events do not fire for unauthed sessions, for example (because
the type does not match). I deemed changing their behaviour too risky, and
the current behaviour may even be more desirable for some uses.
This means we now have roughly paired events:
- s2s-created -> s2s-destroyed (global only)
- s2sin-established -> s2sin-destroyed (global + host)
- s2sout-established -> s2sout-destroyed (global + host)
4 years ago
Kim Alvefur
e789472327
core.s2smanager: Set "direction" on destroyed sessions ( fixes #1641 )
...
Should prevent errors in certain places where it logs
session.direction captialized using gsub.
Might cause bugs tho, but then the session is destroyed so maybe it
doesn't matter?
5 years ago
Kim Alvefur
3aee8e24a6
s2s: Allow passing a custom error for bouncing queued stanzas ( #770 )
...
Since stream errors and stanza errors are different
6 years ago
Kim Alvefur
fb13625e08
core.s2smanager: Fix traceback due to mixup with to/from
...
Forgot to swap to and from in 3123a13cf577
6 years ago
Kim Alvefur
72b4209cfb
core.s2smanager: Remove bidi-enabled s2sin from outgoing routing table
...
Caused creation of new s2sout instead of proper bidi-enabled s2sin.
6 years ago
Kim Alvefur
2398f38135
core.s2smanager: Add map of names authenticate for remote on s2sout for parity with s2sin
...
Making s2sin and -out look more alike in preparation for bidi support
6 years ago
Kim Alvefur
1cebbe481b
core.s2smanager: Add [direction] boolean flags to s2s connections
...
This will allow representing connections that go both directions
6 years ago
Kim Alvefur
7bce7c9fbe
core.s2smanager: Rewrite log line to use formatting instead of concatenation
...
Makes it more in line with logging elsewhere. Potentially avoids or at
least delays creation of new string.
7 years ago
Kim Alvefur
cc653ef0d9
core.s2smanager: Remove use of tostring in logging
...
This is now performed by loggingmanager
7 years ago
Kim Alvefur
d70c07e53f
s2smanager: Explicitly export the incoming_s2s table [luacheck]
8 years ago
Kim Alvefur
43b814a83b
vairious: Add annotation when an empty environment is set [luacheck]
8 years ago
Kim Alvefur
1ecc3a7918
core: Split some very long lines [luacheck]
9 years ago
Kim Alvefur
8db3c0f7ee
s2smanager: Include a stub thread on destroyed sessions (thanks Link Mauve)
10 years ago
Kim Alvefur
a1856627f5
s2smanager: Make sure destroyed sessions have a sends2s method
11 years ago
Matthew Wild
7b3df2bae6
portmanager, s2smanager, sessionmanager, stanza_router, storagemanager, usermanager, util.xml: Add luacheck annotations
11 years ago
Kim Alvefur
27265c20e2
core.*: Remove use of module() function
11 years ago
Florian Zeitz
1d833bb807
Remove all trailing whitespace
13 years ago
Matthew Wild
18889eae1b
sessionmanager, s2smanager: Remove unused imports
13 years ago
Matthew Wild
a5e2b65c01
sessionmanager, s2smanager: Remove open_session tracing
13 years ago
Matthew Wild
c908af2a7d
s2smanager: Remove unused function parameter
13 years ago
Matthew Wild
5f6e150c61
s2smanager: Access prosody.hosts instead of hosts global directly
13 years ago
Matthew Wild
339e74b1b9
s2smanager, mod_s2s, mod_dialback, mod_saslauth: Move s2smanager.make_authenticated() to mod_s2s, and plugins now signal authentication via the s2s-authenticated event
13 years ago
Kim Alvefur
3f4b64ddb6
s2smanager: Use unused local, reduce table indexing
13 years ago
Kim Alvefur
4517552d8b
s2smanager: Generate session names used for logging the same way everywhere
13 years ago
Marco Cirillo
d4e080f745
s2smanager: missing return on session.send function.
14 years ago
Kim Alvefur
e7fce52802
core.s2smanager: Fix previous commit (Thanks Martin)
7 years ago
Kim Alvefur
1ec8b45104
core.s2smanager: Use util.session to create sessions
7 years ago
Kim Alvefur
281c3a42c8
core.s2smanager: Spread out session tables over multiple lines
...
Improves readability
7 years ago
Kim Alvefur
cb800a7c5d
core.s2smanager: Rename variable to be same in two functions
7 years ago
Kim Alvefur
5268b2c180
core.s2smanager: Add stub reset_stream method to destroyed sessions
...
Fixes traceback if connection is closed from the 's2s-authenticated' event
7 years ago
Matthew Wild
249829afcb
s2smanager: Remove logging of (unknown) in a case where from_host and to_host should always be set
14 years ago
Matthew Wild
e89b006f03
Hopefully inert commit to clean up logging across a number of modules, removing all cases of concatenation when building log messages
14 years ago
Waqas Hussain
6e9784727f
s2smanager: Fix a traceback when we close a s2s connection ourselves (thanks for the testing Zash).
14 years ago
Matthew Wild
75d9d9e997
mod_s2s, s2smanager, mod_dialback: Move addition of session.send() on s2sin to after they are authenticated (thus from mod_s2s to s2smanager). Update mod_dialback to fire route/remote directly, as session.send() is no longer available for s2sin_unauthed. Fixes #291 .
14 years ago
Kim Alvefur
3713488b27
s2smanager, mod_s2s: Move checking DNS timeout option to mod_s2s
14 years ago
Kim Alvefur
2cd39663b6
s2smanager: Clean up unused imports.
14 years ago
Kim Alvefur
26768f3e54
s2smanager, mod_s2s: Move import of dns_max_depth to mod_s2s
14 years ago
Kim Alvefur
5442ecd0fe
core.s2smanager: Log the entire stream header.
14 years ago
Matthew Wild
ba9e28535b
s2smanager: Fix traceback when socket.tcp6 isn't available
14 years ago
Marco Cirillo
74bff42057
s2smanager, mod_s2s: clear up ip_hosts after s2s is marked as established, remove useless space from mod_s2s code
14 years ago
Florian Zeitz
8f06587c50
s2smanager: remove send_to_host.
14 years ago
Kim Alvefur
f9853f402b
core.s2smanager: Fix check_cert_status() for when the stream has no from attr
14 years ago
Paul Aurich
fdd51ac3ff
s2smanager: Log the host when marking it authenticated
14 years ago
Matthew Wild
f851289311
s2smanager, mod_s2s, mod_s2s/s2sout: Split connection handling out of s2smanager into mod_s2s, and further split connection logic for s2sout to a module lib, s2sout.lib.lua
14 years ago
Matthew Wild
f5b0bf49fd
s2smanager: Fix missing import of 'type' (thanks darkrain)
14 years ago
Waqas Hussain
06aa3c416e
s2smanager: Don't throw an error when the "interface" config option is a string (which it is by default).
14 years ago
Matthew Wild
8143f5ff10
s2smanager: Remove unused reference to modulemanager
14 years ago
Florian Zeitz
d4584664f7
s2smanager: Store port specified by SRV records
14 years ago