Kim Alvefur
e3bb9434f1
mod_s2s: Move out of empty directory
...
mod_s2s.lua had been all alone in there since the removal of
s2sout.lib.lua in 756b8821007a
6 years ago
Kim Alvefur
1ee999ce17
mod_c2s,mod_s2s: Make stanza size limits configurable
6 years ago
Kim Alvefur
c79e73ffbe
mod_c2s,mod_s2s: Use a distinct stream error for hitting stanza size limit
...
Since this is not a real parse error, it should not be reported as such.
6 years ago
Kim Alvefur
1150c8ab78
mod_s2s: Run stream close in async context
...
Allows async processing during stream shutdown. Fixes potential ASYNC-01
issues, however no such issues known at the time of this commit.
6 years ago
Kim Alvefur
0f201fd4b4
mod_s2s: Improve signaling of stream open events
...
Makes it clearer, cleaner and easier to extend.
6 years ago
Kim Alvefur
8cd0bc491f
mod_s2s: Fix typo in comment [codespell]
6 years ago
Kim Alvefur
458f098b1c
mod_s2s: Comment on the various 'reason' arguments passed to :close
6 years ago
Matthew Wild
3e689c6c2d
mod_s2s: Pass use_ipv4/use_ipv6 from config to service resolver
6 years ago
Matthew Wild
8cc9b4d6bd
Backed out changeset 74d66b1be989 (not optimal API)
6 years ago
Matthew Wild
6ab4b84463
mod_s2s: Pass use_ipv4/ipv6 from config to connector config
6 years ago
Kim Alvefur
3a14bfec85
mod_s2s: Remove obsolete pre-connect buffer
...
Originally added in c500d4cb7855
Dead code since the net.connect switch in 756b8821007a
6 years ago
Kim Alvefur
8669c1bbd4
mod_s2s: Fix name conflict introduced in c7864f970969
6 years ago
Kim Alvefur
ee33732c5f
mod_s2s: Invert condition to return early and reduce indentation
6 years ago
Kim Alvefur
129b463d81
mod_s2s: Fix mistake in 28755107c2f4
6 years ago
Kim Alvefur
190a2a2cab
mod_s2s: Refactor stream error handling on close
...
Deduplicates the 3 log calls that log the same thing but subtly
differently. The first one would say "Disconnecting localhost" and the
last one didn't log the IP.
6 years ago
Kim Alvefur
a5d6f3717a
mod_s2s: Use stanza type check instead of duck typing
6 years ago
Kim Alvefur
7f02081af2
mod_s2s: Improve TLS handshake error messages
...
This should make it clearer that it's about the TLS handshake. Otherwise
it's something like "unsupported protocol" or "no shared ciphers" that
might not be that obvious.
6 years ago
Kim Alvefur
78a340ccf7
mod_s2s: Log from session logger
...
Helps locating all messages related to a specific session
6 years ago
Kim Alvefur
6494446456
mod_s2s: Improve log message about forbidding insecure connections
...
This new wording generator is nice.
6 years ago
Kim Alvefur
349ac37e3c
mod_net_multiplex: Add support for using ALPN
...
Potentially a bit more efficient since it can jump to the selected
protocol on connect instead of waiting for some data to look at.
Adds a 'protocol' field to net providers for this purpose.
6 years ago
Kim Alvefur
36483b12ca
mod_s2s: Prevent unhandled stanza handler from complaining about stream features on aborted connections
...
I have no idea why I wrote return false in e5945fb5b71f
6 years ago
Kim Alvefur
ebfbcab1a9
mod_s2s: Abort outgoing connections earlier when TLS requirement isn't satisfied
...
This ensures the closure reason is accurate and not reported as an
authentication or other problem
6 years ago
Kim Alvefur
4560212e9b
mod_s2s: Send stream errors for cert problems on outgoing connections
...
Rationale in comment.
6 years ago
Kim Alvefur
07e3b93181
mod_s2s: Improve error in bounces due to cert validation problems
6 years ago
Kim Alvefur
5047e42a4d
mod_s2s: Add error text for error replies on some s2s failures ( #770 )
6 years ago
Kim Alvefur
4a9bb8c321
s2s: Allow passing a custom error for bouncing queued stanzas ( #770 )
...
Since stream errors and stanza errors are different
6 years ago
Kim Alvefur
80a58e551b
mod_s2s: Wait for remote to close any connection allowing incoming stanzas
...
Ie both s2sin and bidi-enabled s2sout.
6 years ago
Kim Alvefur
36edc39c5b
mod_s2s: Allow passing bounce reason as an util.error object (see #770 )
...
This argument is currently unused in s2smanager.
6 years ago
Kim Alvefur
1d46ca36e6
mod_s2s: Only nameprep stream to/from addresses if they are present
...
Prevents traceback from nameprep(nil)
6 years ago
Kim Alvefur
aa602d5768
mod_s2s: Close with a stream error in case neither SASL or Dialback are available
...
This both tells the remote server and users who sent any queued stanzas
why it failed.
6 years ago
Kim Alvefur
7191f9b4f6
mod_s2s: Remove warning about hostname mismatch
...
It triggers on bidi-related routing where this to/from is flipped.
Removing since I don't think we have ever seen this potential bug.
6 years ago
Kim Alvefur
72c7702ca5
mod_s2s: Insert s2sin into outgoing routing table when bidirectional
6 years ago
Kim Alvefur
976d6ec54b
mod_s2s: Add function to send replies on s2sout connections that support incoming traffic
6 years ago
Kim Alvefur
db40d65ac3
mod_s2s: Handle authentication of s2sin and s2sout the same way
6 years ago
Kim Alvefur
e0334f431b
mod_s2s: Remove obsolete cleanup code
...
These were added by s2sout.lib
6 years ago
Kim Alvefur
47625cfc95
Remove COMPAT with temporary luasec fork
...
The changes in the temporary fork were merged into mainline luasec ca
2013 and included in the 0.5 release in 2014.
6 years ago
Kim Alvefur
2b7a0e891a
mod_s2s: Use net.connect instead of s2sout.lib for outgoing s2s connections
7 years ago
Kim Alvefur
80c57be10f
mod_s2s: Distinguish between high and low level errors in bounces
...
`remote-server-not-found` is reported for problems occurring without a
reply `<stream>` having been opened, e.g.?DNS records were not found or
no TCP stream could be established to a functioning XMPP entity.
`remote-server-timeout` is reported for problems that occurring after a
stream has been opened, such as configuration problems, inability to
perform TLS or unsuccessful certificate validation.
Related: #770
7 years ago
Kim Alvefur
2b8caf8dac
plugins: Remove tostring call from logging
...
Taken care of by loggingmanager now
Mass-rewrite using lua pattern like `tostring%b()`
7 years ago
Kim Alvefur
59cd2f787e
mod_s2s: Indicate origin of s2s error
7 years ago
Kim Alvefur
82228a45de
mod_s2s: Silence all warnings instead of ignoring the entire module
7 years ago
Kim Alvefur
b93089dd57
sessionmanager, mod_s2s: Bring debug line for outgoing stanzas in line with that for incoming
8 years ago
Kim Alvefur
cfa41acfa7
mod_s2s: Reduce logging ( #776 )
8 years ago
Kim Alvefur
be56bd2bd5
mod_s2s: Close sockets held by resolver ( #1170 )
8 years ago
Kim Alvefur
f36218aed8
mod_component, mod_s2s: Iterate over child tags instead of child nodes (can include text) in stream error (same as 176b7f4e4ac9)
8 years ago
Matthew Wild
63252575df
mod_s2s: Use a separate resolver object for each outgoing session
...
Cleaner approach hopefully fixes problems with some peoples' DNS
hanging after a while, failed DNS when a large number of queries
are made at once, and source port re-use.
Related issues: #487 , 761, #991 , #992 , #1001
8 years ago
Kim Alvefur
32d6e4e07c
sessionmanager, mod_s2s: Bring debug line for outgoing stanzas in line with that for incoming
8 years ago
Kim Alvefur
87a7a0e66f
mod_s2s: Reduce logging ( #776 )
8 years ago
Emmanuel Gil Peyrot
c70ac331d2
mod_s2s: Add a counter for IPv6.
8 years ago
Kim Alvefur
d67abe23f8
mod_s2s: Don't use string concatenation when passing values to logging
8 years ago