Commit graph

986 commits

Author SHA1 Message Date
Roger A. Light
843872a787 Add mosquitto_client_id_hashv broker helper function 2025-02-03 11:16:58 +00:00
Roger A. Light
3027af5583 Fix int overflow 2024-12-16 22:42:33 +00:00
Roger A. Light
e09213c125 Make use of full buffer 2024-12-10 18:54:12 +00:00
Roger A. Light
4ab829125d Fix libwebsockets build 2024-11-20 14:30:11 +00:00
Roger A. Light
78afc47569 Fix library reinitialise with packet buffer. 2024-11-20 14:20:14 +00:00
Roger A. Light
d903637d02 Fix "multiple packets in a single read" case 2024-11-20 12:33:54 +00:00
Roger A. Light
d98d986a6e Add pcket_buffer_size for clients.
Reduce read() calls
2024-11-19 23:48:54 +00:00
Roger A. Light
a2fe980301 Add mosquitto_ext_auth_continue() 2024-10-28 22:31:44 +00:00
Roger A. Light
dd2c25c1cf Merge branch 'master' into develop 2024-10-19 22:13:14 +01:00
Roger A. Light
0174abe8f3 Don't allow invalid response-topic values. 2024-10-16 15:30:44 +01:00
Roger A. Light
88b7bb3521 Fix NetBSD build 2024-10-12 17:01:09 +01:00
Roger A. Light
fecf4797d9 Open files with appropriate access on Windows.
Closes #3119.
2024-10-11 17:56:49 +01:00
Roger A. Light
849a1d3f8e Fix library cross compilation.
Closes #3129.
2024-10-08 17:27:53 +01:00
Roger A. Light
30adcd6e39 Fix cmake build on OS X.
Closes #3125.
2024-10-06 21:07:27 +01:00
Roger A. Light
8ab20b4ba4 Don't allow SUBACK with missing reason codes.
Closes Eclipse #190
2024-10-02 10:26:08 +01:00
Roger A. Light
7399ac67d1 Don't call memcpy with NULL destination, even with size=0 2024-10-02 10:25:33 +01:00
Carsten Andrich
d3975c8525 fix unused variable warning in net__socket_connect_tls()
Signed-off-by: Carsten Andrich <carsten@andrich.name>
2024-09-07 00:31:04 +01:00
Carsten Andrich
c22ced4915 fix unused parameter warning (only with cmake -DWITH_TLS=OFF) in mosquitto_void_option()
Signed-off-by: Carsten Andrich <carsten@andrich.name>
2024-09-07 00:31:04 +01:00
Roger A. Light
57b5549b3d Fix "payload format invalid" not being allowed as a PUBREC reason code.
Thanks to mdrssv
2024-09-07 00:17:37 +01:00
Roger A. Light
f6d0ddcae0 Clear SSL error state to avoid spurious error reporting.
Thanks to koranyellow. Closes #3054.
2024-09-06 23:56:42 +01:00
Diego Santa Cruz
688fa86de4 fix CLOCK_BOOTTIME use on kernels not having it
When the libc headers used to build mosquitto define CLOCK_BOOTTIME but
the kernel where mosquitto runs does not implement CLOCK_BOOTTIME, all
timestamps are wrong (uninitialized data), because there is no check for
the success of the clock_gettime() calls.

This adds probing for the availability of CLOCK_BOOTTIME from
mosquitto_lib_init(), falling back to CLOCK_MONOTONIC, and then modifies
mosquitto_time() to use the selected clock. Probing at init time avoids
having to do two clock_gettime() calls for every timestamp if
CLOCK_BOOTTIME is not available.

It also fixes a similar problem in mosquitto_lib_init().

Signed-off-by: Diego Santa Cruz <diego.santacruz@spinetix.com>
2024-09-06 23:41:56 +01:00
Flávio Tapajós
a87b5ff6d8 Increase logging of errors
commit 6113eac95a started using MQTT_RC_*
enums as a handle__publish return value, which typically were MOSQ_ERR_*
values.

Signed-off-by: Flávio Tapajós <flavio.tapajos@newtesc.com.br>
2024-09-06 23:26:48 +01:00
Roger A. Light
18fdad5578 Add PROXY v1 support 2024-08-18 21:45:22 +01:00
Roger A. Light
b5e21d146d Move password functions to libcommon. 2024-06-12 21:26:25 +01:00
Roger A. Light
61eb363e03 Remove unused file from build 2024-06-02 23:20:03 +01:00
Roger A. Light
db6ab6869a Fix mismatched alloc/frees 2024-04-25 16:20:14 +01:00
Roger A. Light
41a310a6f1 Fix line endings 2024-04-25 11:51:33 +01:00
Roger A. Light
26eff87522 Add PROXY protocol v2 support 2024-04-24 18:18:42 +01:00
Roger A. Light
688a5e82c8 Update Windows installer. Remove 32-bit installer
Use vcpkg provided pthreads.
2024-04-21 22:44:46 +01:00
Roger A. Light
a3e5deb952 Use vcpkg Windows build for 2.0, re-enable thread support 2024-04-21 22:28:26 +01:00
Roger Light
20b34150f2 Windows build fixes 2024-03-27 08:38:13 +00:00
Roger A. Light
27ce1524e7 Better message expiry fix. 2024-03-18 15:29:40 +00:00
Roger A. Light
2f9bf0e5cf Fix bridge 2024-03-18 14:39:06 +00:00
Roger A. Light
9065b579d0 Refactor topic functions to common static library. 2024-03-17 23:18:35 +00:00
Roger A. Light
4498193331 Refactor file functions to common static library. 2024-03-17 23:13:11 +00:00
Roger A. Light
8cc21d1fa4 Refactor random functions to common static library. 2024-03-17 21:57:15 +00:00
Roger A. Light
16d465fa49 Refactor base64 functions to common static library. 2024-03-17 21:34:27 +00:00
Roger A. Light
9fe8b95dcf Refactor property functions to common static library. 2024-03-17 20:56:14 +00:00
Roger A. Light
b5c25cf1d0 Refactor memory functions to common static library. 2024-03-17 10:30:07 +00:00
Roger A. Light
81ad44e677 Refactor topic check functions to common static library. 2024-03-17 08:15:22 +00:00
Roger A. Light
a6344f833b Refactor time functions to common static library. 2024-03-17 07:58:45 +00:00
Roger A. Light
1204a7a6f7 Refactor strings functions to common static library. 2024-03-17 07:46:42 +00:00
Roger A. Light
6eb56dc6f1 Refactor UTF-8 code to common static library. 2024-03-17 07:45:58 +00:00
Roger A. Light
15ac2e410f No need to call OPENSSL_init_crypto 2024-03-05 14:34:55 +00:00
Roger A. Light
9f7b23ca72 Fix oss-fuzz 67175, 67180, 67191
Embedded 0 characters in a file would prevent the loading of that file.

This could not happen apart from corruption of the file, or by
deliberate manipulation by the admin. Minimal impact.
2024-03-04 14:24:55 +00:00
Roger A. Light
664c6708b2 Further build fixes for oss-fuzz 2024-03-01 10:18:01 +00:00
Roger A. Light
a9ebf37dab Remove support for openssl < 3.0 2024-02-26 19:07:22 +00:00
Roger A. Light
dcd5b803f2 Merge branch 'fixes' into develop 2024-02-21 23:30:33 +00:00
Roger A. Light
eb461e02bd Fuzzing build fix 2024-02-20 17:19:23 +00:00
Roger A. Light
bbdd379e4f Do graceful socket shutdown for clients.
Helps with some tests.
2023-12-24 08:18:00 +00:00