Roger A. Light
aa29b45e70
Merge branch 'master' into develop
2021-09-07 19:17:11 +01:00
Roger A. Light
d09591d92e
Fix reconnecting in some cases when using MOSQ_OPT_TLS_USE_OS_CERTS.
...
Fix reconnecting failing when MOSQ_OPT_TLS_USE_OS_CERTS was in use, but none
of capath, cafile, psk, nor MOSQ_OPT_SSL_CTX were set, and
MOSQ_OPT_SSL_CTX_WITH_DEFAULTS was set to the default value of true.
Closes #2288 . Thanks to Poltorak Serguei.
2021-08-31 15:59:40 +01:00
Roger A. Light
605131502b
Fix MOSQ_OPT_SSL_CTX not being able to be set to NULL.
...
Closes #2289 . Thanks to Poltorak Serguei.
2021-08-31 10:45:10 +01:00
Roger A. Light
9d6a73f9f7
Fix CONNECT performance with many user-properties.
...
An MQTT v5 client connecting with a large number of user-property properties
could cause excessive CPU usage, leading to a loss of performance and
possible denial of service. This has been fixed.
2021-08-26 12:17:42 +01:00
Roger Light
32af599c81
Fix $share subscriptions not being recovered for durable clients.
...
If a plugin had granted ACL subscription access to a
durable/non-clean-session client, then removed that access, the client would
keep its existing subscription. This has been fixed.
2021-08-26 12:17:26 +01:00
Roger A. Light
376226c129
Build warning fixes.
2021-08-26 10:54:03 +01:00
Roger A. Light
9b25dd3b0d
libressl build fixes.
...
Closes #2198 . Thanks to Theo Buehler.
2021-08-24 13:53:03 +01:00
Roger A. Light
0d1837ebe3
Deconfigure thread mode when the loop thread ends.
...
Threaded mode is deconfigured when the mosquitto_loop_start() thread ends,
which allows mosquitto_loop_start() to be called again.
Closes #2242 . Thanks to Timo Lange.
2021-08-24 11:51:38 +01:00
Roger A. Light
9526b4cf23
Check for file==dir only when reading.
2021-08-23 23:19:37 +01:00
Roger Light
ba2ca33671
Strict protocol compliance fixes, and extensive test suite.
2021-08-23 23:19:28 +01:00
Roger Light
723b5d7081
Fix listener mount_point not being removed on outgoing messages.
...
Closes #2244 . Thanks to alflexRH.
2021-08-22 08:23:13 +01:00
Roger Light
6608e852a1
Fix broker not quiting if password_file is specified as a directory.
...
Closes #2241 . Thanks to Bryan Pearson.
2021-08-21 22:45:39 +01:00
Roger Light
93b2232bb9
Apply max_keepalive to MQTT v3.1.1 and v3.1 clients.
2021-08-20 23:27:14 +01:00
Roger A. Light
ea371564e7
Disable TLS 1.3 when using TLS-PSK, because it isn't correctly config'd.
2021-08-19 17:26:04 +01:00
Roger A. Light
a37c8e65d2
TLS-PSK mismatch fix.
...
Produce an error if a TLS-PSK client tries to connect to a broker
that is not configured with TLS-PSK.
2021-08-19 17:26:04 +01:00
Roger A. Light
79542158f4
Fix max_connections option not being correctly counted.
2021-08-17 13:10:18 +01:00
Roger A. Light
9a97a5afc4
Improve client protocol version number logging.
...
Protocol version numbers reported in the log when a client connects now
match the MQTT protocol version numbers, not internal Mosquitto values.
2021-08-04 17:30:24 +01:00
Roger A. Light
4e146b7b53
Fix possible out of bounds memory reads when reading configuration.
...
This would happen with a corrupt/crafted configuration file. Unless your
configuration file is writable by untrusted users this is not a risk.
Closes #567213 . Thanks to Roland Sako.
2021-07-22 16:43:06 +01:00
Roger Light
cad11de873
Merge pull request #2249 from cdelston0/develop-transitive-topics
...
Swap bridge topic storage from array to linked-list
2021-07-09 14:43:22 +01:00
Roger A. Light
49065f03a8
Merge remote-tracking branch 'origin/fixes' into develop
2021-07-09 14:12:05 +01:00
Chris Elston
aa5233fc85
Swap bridge topic array to linked list
...
Bridge topics are added on startup to an allocated array which is
reallocated with each new topic. This change alters bridge topic
storage to use a singly linked list.
This is to facilitate upcoming changes to support bridge topic
add/remove operations.
2021-07-09 09:31:51 +01:00
Roger A. Light
a02aad0a9c
Add mosquitto_sub_matches_acl_with_pattern.
2021-07-08 17:45:50 +01:00
Roger A. Light
f90e55bd36
Reduce memory allocations when sending packets.
2021-06-30 14:53:34 +01:00
Roger A. Light
e0309acebc
Add mosquitto_sub_matches_acl()
...
This moves the sub matching sub code from the dynsec plugin to the library and broker, and removes all of the malloc calls at the same time.
2021-06-10 22:19:39 +01:00
Roger A. Light
b3045d1adf
Fix pattern matching with invalid prefix.
2021-06-10 22:19:39 +01:00
Roger A. Light
6502d6e5f4
Add mosquitto_topic_matches_sub_with_pattern()
...
And use it in the default security checks.
2021-06-10 15:33:01 +01:00
Roger A. Light
dfd5dc5b92
Remove unused struct member.
2021-06-08 23:52:29 +01:00
Roger A. Light
e0bcf8cda4
Simplify SSL accept/connect.
2021-06-08 23:52:25 +01:00
Roger A. Light
8416f928df
Revert premature want_connect fix.
2021-06-08 22:26:14 +01:00
Roger A. Light
403691ce40
Add missing return types.
2021-06-08 22:25:59 +01:00
Roger A. Light
104b94db57
Fix non-reachable bridge blocking the broker on Windows.
...
Closes #2172 . Thanks to Niclas Lindgren.
2021-06-08 12:07:24 +01:00
Roger A. Light
625e2a5060
Refactor to remove duplicate code.
2021-06-08 11:59:12 +01:00
Roger A. Light
906a515704
Simplify client message properties, only one is used.
2021-06-02 15:15:01 +01:00
Roger Light
f934230251
Simplify out packet mutex use.
2021-06-02 15:14:56 +01:00
Roger A. Light
214feb8f6b
Merge branch 'fixes' into develop
2021-05-21 15:42:26 +01:00
Roger A. Light
0d3870585b
Plugin delayed authentication.
2021-05-19 16:54:26 +01:00
Roger A. Light
16fb0025a7
Improve QoS 0 outgoing packet queueing.
2021-05-18 16:53:45 +01:00
Roger Light
9bb58a88fc
Cleanup messsage before return.
...
Coverity scan #1451483 .
2021-05-16 19:57:59 +01:00
Roger Light
9c9ca33d63
Fix two potential leaks.
2021-05-10 21:56:44 +01:00
Roger Light
0a90e62f93
CMake tidy.
2021-05-10 00:39:46 +01:00
Roger Light
931c590a37
Merge pull request #2156 from abiliojr/improve_tls
...
add cipher settings for bridge, and support for TLS 1.3 ciphers
2021-05-07 01:01:46 +01:00
Roger A. Light
a2ab20df13
Don't call read() if sockpairR < 0.
...
Coverity #1450782 .
2021-05-06 21:04:49 +01:00
Roger A. Light
b7b3a42e75
Strict build fixes.
2021-05-02 23:51:56 +01:00
Roger A. Light
8a03b5ad5c
Function for checking if a context is connected.
2021-05-02 23:19:54 +01:00
Roger Light
b4c86df6f5
Fix missing control path.
...
Closes #2190 . Thanks to RengeRenge.
2021-04-25 23:10:06 +01:00
Roger Light
e1c8f09372
Remove C++ style comments.
2021-04-25 22:26:12 +01:00
Roger Light
ef7662ca8e
Merge branch 'master' into develop
2021-04-24 23:32:48 +01:00
Christian Beier
fe10226cc9
Fix building with Visual Studio 2008
...
This older Microsoft compiler does not support mixing declarations and
code and misses some error defines. This commit enables building with
VS2008 by moving up some variable declarations and defining error
codes to their WinSock counterparts in case they're not defined.
Signed-off-by: Christian Beier <info@christianbeier.net>
2021-04-18 21:23:25 +02:00
Roger Light
6ebbb4d654
Fix possible socket leak.
...
This would occur if a client was using `mosquitto_loop_start()`, then if
the connection failed due to the remote server being inaccessible they
called `mosquitto_loop_stop(, true)` and recreated the mosquitto object.
See: https://www.eclipse.org/forums/index.php?t=rview&goto=1839865#msg_1839865
2021-04-02 11:03:01 +01:00
Abilio Marques
c637a192a3
add support for tlsv1.3 ciphers
...
Signed-off-by: Abilio Marques <abiliojr@gmail.com>
2021-03-29 06:54:46 +02:00