Commit Graph

1277 Commits

Author SHA1 Message Date
Roger A. Light
8285a57bb9 Fix some error handling related to the bind_interface option. 2022-12-02 14:31:40 +00:00
Roger A. Light
c06599fab2 Fix some retained topic memory not being cleared immediately after used. 2022-11-29 11:55:55 +00:00
Roger A. Light
f44d8fad50 Fix Coverity 1491742 and 1491741 2022-08-31 10:00:05 +01:00
Roger A. Light
e22030bb2c Try to convince Coverity this string is terminated. 2022-08-31 09:49:37 +01:00
Roger A. Light
86fffa34a9 Fix $SYS messages being expired after 60 seconds
and hence unchanged values disappearing. Thanks to Wim Nelis and
Christoph Krey.
2022-08-22 15:57:14 +01:00
Roger A. Light
ef44b22cef Fix local bridge session expiry interval. 2022-08-18 15:06:11 +01:00
Roger A. Light
1af3152ddc Fix persisted clients being restored without a session expiry time. 2022-08-18 14:13:35 +01:00
Roger A. Light
4a6570567a Merge branch 'x-forwarded-for-lws' of https://github.com/hardillb/mosquitto into hardillb-x-forwarded-for-lws 2022-08-16 14:30:37 +01:00
Ben Hardill
0eec37af99
Add support for X-Forwarded-For LWS
I know you've added this for the next release, but here is a fix
for LWS. But just incase there are any more 2.0.x releases.

It does leave the incoming port as 0 but as this is pretty meaningless
for a proxied connection I think it's probably ok.

Signed-off-by: Ben Hardill <hardillb@gmail.com>
2022-08-16 13:54:06 +01:00
Roger A. Light
7917553eb2 Fix expired messages causing queued messages not to be delivered.
Closes #2609. Thanks to JSchy65.
2022-08-16 12:29:18 +01:00
Roger A. Light
cd88906132 Clearer function name 2022-08-16 12:28:13 +01:00
Roger A. Light
fa31b6f41d Fix bridge queued messages not being persisted.
This happens when local_cleansession is set to false and cleansession is
set to true.

Closes #2604. Thank to Frank Dekervel.
2022-08-13 22:46:19 +01:00
Roger A. Light
775bd2effd Fix confusing "out of memory" error.
This happens when a client is kicked in the dynamic security plugin.

Closes #2525. Thanks to sezanzeb.
2022-08-12 08:17:17 +01:00
Roger A. Light
351911bd8f Fix incorrect return code being sent in DISCONNECT.
This is for when a client session is taken over.

Closes #2607. Thanks to der-b
2022-08-10 14:17:22 +01:00
Roger A. Light
08610f7c99 Further fix for #2546. 2022-08-09 21:25:55 +01:00
Roger A. Light
a913de2d28 Fix some PUBLISH messages not being counted in $SYS stats.
Closes #2448. Thanks to Antoine.
2022-08-08 00:29:37 +01:00
Roger A. Light
8c0600c40c Fixed build for openssl compiled with OPENSSL_NO_ENGINE.
Closes #2589. Thanks to Dirk Feytons.
2022-08-06 23:16:55 +01:00
Roger A. Light
a146c218ad Fix unlimited message quota not being properly checked.
This is for incoming messages.

Closes #2593. Thanks to dongguoqing2015.
2022-08-06 22:49:08 +01:00
Roger A. Light
c99502a256 Add clients to session expiry check list when restarting and reloading from persistence.
Closes #2546. Thanks to Joachim Schachermayer.
2022-05-23 23:05:49 +01:00
Roger A. Light
80b36919b1 Fix incorrect pointer use. 2022-05-23 22:38:02 +01:00
Roger A. Light
09ac578459 Fix unused flags in CONNECT command being forced to be 0 in MQTT v3.1
This check is not required until v3.1.1.

Closes #2522. Thanks to garinocyr
2022-05-17 17:41:57 +01:00
Abilio Marques
3c48b501e0 broker: fix memory leaks on plugin payload modification
Signed-off-by: Abilio Marques <abiliojr@gmail.com>
2022-03-13 08:48:00 +01:00
Roger Light
fad0b39eaa
Merge pull request #2408 from tjlusco/constant-restart-timeout-fix
Fix constant restart_timeout
2022-02-24 15:55:36 +00:00
Roger A. Light
62c0d0c9c8 Merge branch 'fix-support-tick-with-per-listener-settings' of https://github.com/XavierDooms/mosquitto into XavierDooms-fix-support-tick-with-per-listener-settings 2022-02-24 13:26:06 +00:00
Roger A. Light
96931643a4 Use strings.h for strcasecmp, except on Windows.
Closes #2420. Thanks to Frédéric Fauberteau.
2022-02-24 12:02:16 +00:00
Roger Light
378e96db22
Merge pull request #2430 from abiliojr/fix_invalid_pwd_msg
fix confusing log message on connack error
2022-02-24 11:36:59 +00:00
Abilio Marques
5f57de21cd Fix memory leak when modifying topics using the plugin API
Signed-off-by: Abilio Marques <abiliojr@gmail.com>
2022-02-11 21:41:26 +01:00
Abilio Marques
26f747e0ac fix confusing log message on connack error
Signed-off-by: Abilio Marques <abiliojr@gmail.com>
2022-01-11 19:26:25 +01:00
Xavier Dooms
bff71fd99f support plugin tick callbacks with per_listener_settings enabled
add tests for the plugin tick

Signed-off-by: Xavier Dooms <dooms.xavier@gmail.com>
2021-12-27 23:23:58 +01:00
Lusco
366ec5c66e
Update conf.c
The default bridge configuration uses the backoff restart configuration, however this is not cleared if only a constant timeout is desired, causing it to always use the backoff configuration with a 30 second cap.

To trigger this error, use a bridge configuration with a constant timeout (e.g restart_timeout 5). Note that the timeout value is not honoured. 

Clear the backoff configuration when applying restart_timeout.

Signed-off-by: Trevor Luscombe <trevor.luscombe@gmail.com>
2021-12-16 14:14:24 +10:00
Roger A. Light
94d61305fa Fix bridge not respecting receive-maximum when reconnecting with MQTT v5. 2021-11-09 13:53:37 +00:00
Roger A. Light
9e5b850181 Check for NULL before strcmp. 2021-10-24 14:23:57 +01:00
Roger Light
5cae4d1d81 Fix broker sending duplicate CONNACK on failed MQTT v5 reauthentication.
Closes #2339. Thanks to hvxl.
2021-10-12 22:33:05 +01:00
Roger A. Light
be80a3f4d0 Fix client id not showing in log on failed connections, where possible. 2021-10-06 10:09:38 +01:00
Roger A. Light
a1a190b482 Pointless whitespace tidy. 2021-10-05 15:20:37 +01:00
Roger A. Light
7061569bf4 Don't send retained messages when a shared subscription is made. 2021-10-04 16:26:58 +01:00
Roger A. Light
7b58eee414 Fix problem parsing config files with Windows line endings.
Closes #2297. Thanks to all the people who commented there!
2021-09-23 11:40:40 +01:00
Roger A. Light
330bf6efdc Various fixes around inflight quota management.
Closes #2306. Thanks to canique.
2021-09-22 17:20:24 +01:00
Roger A. Light
7551a29985 Fix LWT messages not being delivered if per_listener_settings was set to true
Closes #2314. Thanks to Marc Hamel.
2021-09-21 22:51:25 +01:00
Roger A. Light
d942ed7eec Fix max_keepalive option not being able to be set to 0. 2021-09-09 12:19:13 +01:00
Roger A. Light
37b5aedcb6 Fix for #575314.
Incoming QoS 2 messages that had not completed the QoS flow were not being
checked for ACL access when a clean session=False client was reconnecting.

Closes #575314.
2021-08-30 16:14:27 +01:00
Roger A. Light
9d95cba95e Fix leak. 2021-08-30 14:11:23 +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 Light
ba2ca33671 Strict protocol compliance fixes, and extensive test suite. 2021-08-23 23:19:28 +01:00
Roger Light
526b8430e2 Fix for #2283.
Closes #2283. Thanks to Heath Raftery.
2021-08-21 20:14:51 +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
0143db71a1 Fix TLS certs and PSK not being able to be config'd at the same time. 2021-08-19 17:26:04 +01:00