Kim Alvefur
6b98a3f551
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
5abc2e6a5c
mod_c2s,mod_s2s: Make stanza size limits configurable
6 years ago
Kim Alvefur
d22e85debc
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
a7c0def27f
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
289898e68f
mod_s2s: Improve signaling of stream open events
...
Makes it clearer, cleaner and easier to extend.
6 years ago
Kim Alvefur
798995ef1a
mod_s2s: Fix typo in comment [codespell]
6 years ago
Kim Alvefur
ebb79437a8
mod_s2s: Comment on the various 'reason' arguments passed to :close
6 years ago
Matthew Wild
165901fe80
mod_s2s: Pass use_ipv4/use_ipv6 from config to service resolver
6 years ago
Matthew Wild
6e108728a1
Backed out changeset 74d66b1be989 (not optimal API)
6 years ago
Matthew Wild
9782727301
mod_s2s: Pass use_ipv4/ipv6 from config to connector config
6 years ago
Kim Alvefur
ad26a3b047
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
ffcb8303cc
mod_s2s: Fix name conflict introduced in c7864f970969
6 years ago
Kim Alvefur
2d5eaff749
mod_s2s: Invert condition to return early and reduce indentation
6 years ago
Kim Alvefur
9f46aa4d48
mod_s2s: Fix mistake in 28755107c2f4
6 years ago
Kim Alvefur
91415f5a71
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
a62ff5dc64
mod_s2s: Use stanza type check instead of duck typing
6 years ago
Kim Alvefur
33ba4c2dba
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
56500e6e05
mod_s2s: Log from session logger
...
Helps locating all messages related to a specific session
6 years ago
Kim Alvefur
39cc0ec451
mod_s2s: Improve log message about forbidding insecure connections
...
This new wording generator is nice.
6 years ago
Kim Alvefur
0fdb85997a
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
35d07425e3
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
61228e919c
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
976a86ee46
mod_s2s: Send stream errors for cert problems on outgoing connections
...
Rationale in comment.
6 years ago
Kim Alvefur
2934eccd99
mod_s2s: Improve error in bounces due to cert validation problems
6 years ago
Kim Alvefur
55c130d1e4
mod_s2s: Add error text for error replies on some s2s failures ( #770 )
6 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
4216970602
mod_s2s: Wait for remote to close any connection allowing incoming stanzas
...
Ie both s2sin and bidi-enabled s2sout.
6 years ago
Kim Alvefur
6666a4c814
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
b24814cbe4
mod_s2s: Only nameprep stream to/from addresses if they are present
...
Prevents traceback from nameprep(nil)
6 years ago
Kim Alvefur
5460dfed75
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
55efbf445b
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
4eda545430
mod_s2s: Insert s2sin into outgoing routing table when bidirectional
6 years ago
Kim Alvefur
f6ba50139a
mod_s2s: Add function to send replies on s2sout connections that support incoming traffic
6 years ago
Kim Alvefur
5c27fe4b79
mod_s2s: Handle authentication of s2sin and s2sout the same way
6 years ago
Kim Alvefur
42861396cd
mod_s2s: Remove obsolete cleanup code
...
These were added by s2sout.lib
6 years ago
Kim Alvefur
b16782257d
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
c788104e04
mod_s2s: Use net.connect instead of s2sout.lib for outgoing s2s connections
7 years ago
Kim Alvefur
45a8e8ea7f
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
40b1e3e0ed
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
ab950b3e79
mod_s2s: Indicate origin of s2s error
7 years ago
Kim Alvefur
4f7af62406
mod_s2s: Silence all warnings instead of ignoring the entire module
7 years ago
Kim Alvefur
e59fdc42ed
sessionmanager, mod_s2s: Bring debug line for outgoing stanzas in line with that for incoming
8 years ago
Kim Alvefur
c2d1ea2b04
mod_s2s: Reduce logging ( #776 )
8 years ago
Kim Alvefur
899924566e
mod_s2s: Close sockets held by resolver ( #1170 )
8 years ago
Kim Alvefur
5dee36d838
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
86ee041be8
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
15de51f8c5
sessionmanager, mod_s2s: Bring debug line for outgoing stanzas in line with that for incoming
8 years ago
Kim Alvefur
f86af44208
mod_s2s: Reduce logging ( #776 )
8 years ago
Emmanuel Gil Peyrot
f7adf08e5a
mod_s2s: Add a counter for IPv6.
8 years ago
Kim Alvefur
fc00ed8289
mod_s2s: Don't use string concatenation when passing values to logging
8 years ago