Roger A. Light
93c730f799
Fix potential intermittent initial bridge connections when using poll().
2021-01-06 22:03:34 +00:00
Roger A. Light
8385769b86
Fix apparmor incorrectly denying access db tmp file.
...
This is /var/lib/mosquitto/mosquitto.db.new.
Closes #1978 . Thanks to gnampf89.
2020-12-27 23:05:53 +00:00
Roger A. Light
b2da540c64
Fix large packets not being completely published to slow clients.
...
Also fix bridge connection not relinquishing POLLOUT after messages are
sent.
Closes #1977 . Thanks to marchaesen.
Closes #1979 . Thanks to GorazdKikelj.
2020-12-27 23:03:38 +00:00
Roger A. Light
9d3732a62d
Fix auth_method
not being provided to the extended auth plugin event.
...
Closes #1975 . Thanks to Jinming Chen.
2020-12-23 17:19:51 +00:00
Roger A. Light
5a565da82b
Bump version number. Update changelog and web pages.
2020-12-22 16:56:07 +00:00
Roger A. Light
97d9f471c3
Fix websockets connections blocking non-ws connections on Windows.
...
Closes #1934 . Thanks to sectokia and jarapa9.
2020-12-22 16:48:57 +00:00
Roger A. Light
b8962cc040
Add more log messages for dynsec load/save error conditions.
2020-12-22 10:00:23 +00:00
Roger A. Light
c6a6165f3b
Fix dynamic security configuration possibly not being reloaded on Windows only.
...
Closes #1962 . Thanks to martgeier.
2020-12-20 23:02:19 +00:00
Roger A. Light
4a012aef06
Fix man pages not being built when using CMake.
...
Closes #1969 . Thanks to phplpf.
2020-12-20 22:33:01 +00:00
Roger A. Light
2db9aecac4
Do not reset bind address option if passed NULL.
...
mosquitto_connect_bind_async() and mosquitto_connect_bind_v5() should not
reset the bind address option if called with bind_address == NULL.
Otherwise calling mosquitto_connect_async() will *force* the bind
address to be reset, even if previously set with
mosquitto_string_option().
2020-12-20 17:21:17 +00:00
Roger A. Light
e02b5a2775
Fix $SYS/broker/publish/messages/+ counters not being updated for QoS 1, 2
...
Closes #1968 . Thanks to promahn.
2020-12-18 22:55:10 +00:00
Roger A. Light
d02bc03ed8
Bump version, changelog and webpage.
2020-12-17 15:19:36 +00:00
Roger A. Light
f930970008
Fix persistence_location not appending a '/'.
2020-12-17 15:19:33 +00:00
Roger A. Light
2d9d1beee4
Fix ChangeLog error. Closes #1941 .
2020-12-17 14:12:53 +00:00
Roger A. Light
f10de9831a
Fix slow initial bridge connections for WITH_ADNS=no.
2020-12-17 14:12:53 +00:00
Roger A. Light
1d92184b2f
Fix local bridges being disconnected on SIGHUP.
...
Closes #1942 . Thanks to charlemagnelasse.
2020-12-17 14:00:50 +00:00
Roger A. Light
00c68203b8
Fix QoS 0 messages not being delivered if max_queued_messages was set to 0.
...
Closes #1956 . Thanks to nduhme.
2020-12-17 11:57:15 +00:00
Roger A. Light
d05a49a2cf
Fix bridges possibly not completing connections when WITH_ADNS is in use.
...
Closes #1960 . Thanks to twegener-embertec.
2020-12-17 11:31:38 +00:00
Roger A. Light
de141540fb
Fix mosquitto_sub being unable to terminate with Ctrl-C.
...
This occured if a successful connection was not made.
Closes #1957 . Thanks to Peoh.
2020-12-17 10:40:58 +00:00
Roger Light
113603168b
Fix LWT not being sent on client takeover.
...
This was not happening for the case when the existing session wasn't
being continued.
Closes #1946 . Thanks to Rory Piper.
2020-12-13 23:11:02 +00:00
Roger Light
74f3285cf8
Fix generic
docker build.
...
Closes #1945 . Thanks to Andreas Schildbach.
2020-12-13 21:11:42 +00:00
Roger Light
f63386bf4a
Fix mosquitto_passwd -b
using username as password.
...
Only applies if if `-c` is not also used.
Closes #1949 . Thanks to J. Augusto de Oliveira.
2020-12-13 20:32:30 +00:00
Roger A. Light
abac67299f
Fix excessive CPU use on non-Linux systems when the open file limit is set high.
...
Closes #1947 . Thanks to Patrick TJ McPhee.
2020-12-12 22:10:42 +00:00
Roger A. Light
f7dc138157
Fix install
target when using WITH_CJSON=no.
...
Closes #1938 . Thanks to apple3306 and JulianCaruso.
2020-12-11 00:07:11 +00:00
Roger A. Light
ecf6f9079a
Fix build regression for WITH_WEBSOCKETS=yes on non-Linux systems.
2020-12-10 23:33:46 +00:00
Roger A. Light
2307c9fa07
Update web pages.
2020-12-10 14:39:16 +00:00
Roger A. Light
36eb5ca0c9
Bump changelog date.
2020-12-10 14:31:47 +00:00
Roger A. Light
37ce51703f
Fix websockets listeners not causing the main loop not to wake up.
...
Closes #1936 . Thanks to sectokia.
2020-12-10 12:31:52 +00:00
Roger A. Light
66b680af34
Bump version number.
2020-12-09 22:30:06 +00:00
Roger A. Light
d8dcfd75fe
lib: Fix DH group not being set for TLS connections.
...
This meant ciphers using DHE couldn't be used.
Closes #1925 . Closes #1476 . Thanks to Jonathan Sönnerup, Valerii
Demeshko, and sectokia.
2020-12-09 22:30:06 +00:00
Roger A. Light
b7f0161f52
Fix DH group not being set for TLS connections.
...
This meant ciphers using DHE couldn't be used.
Closes #1925 . Closes #1476 . Thanks to Jonathan Sönnerup, Valerii
Demeshko, and sectokia.
2020-12-09 15:40:45 +00:00
Roger A. Light
bdfa5e714a
Fix mosquitto_passwd -U
2020-12-09 14:08:37 +00:00
Roger A. Light
9968e35981
Fix websockets connections on Windows blocking subsequent connections.
...
Closes #1934 . Thanks to sectokia.
2020-12-09 11:39:53 +00:00
Roger A. Light
0d747673d3
Distribute cmake/ and snap/ directories in tar.
2020-12-06 23:12:04 +00:00
Roger A. Light
c25229c13a
Fix build using WITH_TLS=no when the openssl headers aren't available.
2020-12-04 23:44:38 +00:00
Roger A. Light
791c63372b
Fix cjson include paths.
2020-12-04 22:15:19 +00:00
Roger A. Light
74db0e977f
Merge branch 'develop'
2020-12-02 22:44:26 +00:00
Roger A. Light
6904fac6a4
Bump version number and changelog.
2020-12-02 20:54:13 +00:00
Roger A. Light
232a759320
Log client port on new connections.
...
Closes #1911 . Thanks to twegener-embertec.
2020-12-01 22:38:59 +00:00
Roger A. Light
04c110183c
Bridge support for MQTT v5 maximum-qos.
2020-12-01 18:15:29 +00:00
Roger A. Light
ca4b23486b
Bridges now obey MQTT v5 server-keepalive.
2020-12-01 16:08:05 +00:00
Roger A. Light
0c22f475ff
Fix bridges incorrectly setting Wills to manage remote notifications.
...
This is for when `notifications_local_only` was set true.
Closes #1902 . Thanks to marcinkowskip.
2020-12-01 14:33:13 +00:00
Roger A. Light
b34dcd2a67
Final remove support for legacy libwebsockets
...
This means libwebsockets < 2.4.0.
2020-12-01 13:41:14 +00:00
Roger A. Light
c39a42adcc
Report an error if the config file is set to a directory.
...
Closes #1814 . Thanks to Odysseus1710.
2020-12-01 12:17:31 +00:00
Roger A. Light
29c771cdd4
Add lib and client support for OS CA certs
...
- Add `MOSQ_OPT_TLS_USE_OS_CERTS` option, to instruct the client to load and trust OS provided CA certificates for use with TLS connections.
- All clients now load OS provided CA certificates if used with `-L
mqtts://...`, or if port is set to 8883 and no other CA certificates are
used. Closes #1824 .
- Add the `--tls-use-os-certs` option to all clients.
Closes #1824 . Thanks to Jens Reimann.
2020-12-01 11:51:13 +00:00
Roger A. Light
b7e6638fd8
Add ciphers_tls1.3
option, to allow setting TLS v1.3 ciphersuites.
...
Closes #1825 . Thanks to Valentin Dimov.
2020-12-01 10:45:10 +00:00
Roger A. Light
b169dc0b1e
mosquitto_sub will quit with an error on Windows if %U is used.
...
Seconds since the Unix epoch is not a parameter that can be obtained
with strftime on Windows.
Closes #1908 . Thanks to Danil intl.
2020-11-26 09:10:04 +00:00
Roger A. Light
dac841a342
Better outgoing QoS 0 limiting.
2020-11-25 10:00:45 +00:00
Roger A. Light
4667c9d5bc
Change max_queued_messages default to 1000.
2020-11-24 10:13:21 +00:00
Roger A. Light
10ecae6275
Fix bridge sock not being removed from sock hash on error
...
Prior to this, duplicate entries could be added to the sock hash, which caused an infinite loop. Only affects bridges with bad settings on startup, and only when compiled using WITH_ADNS=yes.
Closes #1897 . Thanks to Rodolfo Ochoa.
2020-11-18 15:43:57 +00:00
Roger A. Light
f02c67fecf
Fix file logging on Windows.
...
Closes #1880 . Thanks to J1EXA, richl, and EnneiteZer.
2020-11-17 11:08:20 +00:00
Roger A. Light
e7a4e73cd8
Fix listener not being reassociated with client.
...
This occurred when reloading a persistence file and
`per_listener_settings true` is set and the client did not set a
username.
Closes #1891 . Thanks to Mikkel Nepper-Christensen.
2020-11-12 17:36:49 +00:00
Roger A. Light
a0c39b193b
Fix description of -e
and -t
arguments in mosquitto_rr.
...
Closes #1881 . Thanks to Arnav Singh.
2020-11-07 23:11:55 +00:00
Roger A. Light
2a1df4ddb2
Breaking: Drop privileges after loading the configuration
...
This change means privileges are dropped before loading certificates, starting logging, creating the pid file etc. are carried out, so all of those actions must now be changed to ensure that the unprivileged user can carry them out.
2020-11-05 12:05:07 +00:00
Roger A. Light
e6dd08074d
TLS certificates for the server are now reloaded on SIGHUP.
2020-11-04 22:57:10 +00:00
Roger A. Light
e01d391c0b
Fix crash on Windows if loading a plugin fails.
...
Closes #1866 . Thanks to roebotron.
2020-10-27 18:25:00 +00:00
Roger A. Light
abbeb4494f
Change tls_version
option behaviour.
...
The `tls_version` option now defines the *minimum* TLS protocol version to
be used, rather than the exact version.
Closes #1258 . Thanks to Daniele Sluijters.
2020-10-27 16:44:03 +00:00
Roger A. Light
edee5aaf8d
Add the bridge_bind_address
option.
...
Closes #1311 . Thanks to beville.
2020-10-27 16:32:21 +00:00
Roger A. Light
d8f5aacd7f
Add the bridge_max_packet_size
option.
...
Closes #265 .
2020-10-27 11:35:06 +00:00
Roger A. Light
916c3744f3
Fix log_timestamp_format
not applying to log_dest topic
.
...
Closes #1862 . Thanks to Kaushik-27.
2020-10-27 10:35:45 +00:00
Roger A. Light
e82ee879d5
Merge branch 'fixes' into develop
2020-10-27 00:43:07 +00:00
Roger A. Light
751fda44bd
Remove conflict marker.
2020-10-21 13:38:47 +01:00
Roger A. Light
4ae8971ce1
The broker now sends the receive-maximum property for MQTT v5 CONNACKs.
2020-10-21 13:19:07 +01:00
Roger A. Light
3506fe4099
Update docs for acl deny feature.
2020-10-14 12:09:48 +01:00
Roger A. Light
6104172bcf
Fix connect properties not being sent.
...
This was happening when the client automatically reconnected.
Closes #1846 . Thanks to DSOFreak.
2020-10-14 11:21:41 +01:00
Roger A. Light
9724710cd6
Add MOSQ_OPT_BIND_ADDRESS.
...
This allows setting of a bind address independently of the
`mosquitto_connect*()` call.
2020-10-14 10:31:46 +01:00
Roger A. Light
94c4108977
The pid_file
option will now always attempt to write a pid file.
...
This happens regardless of whether the `-d` argument is used when
running the broker.
Closes #1845 . Thanks to habazut.
2020-10-13 21:14:48 +01:00
Roger A. Light
be8b94189c
Document that X509_free() must be called after using mosquitto_client_certificate().
...
Closes #1842 . Thanks to Wolfgang Petroschka.
2020-10-13 10:41:08 +01:00
Roger A. Light
4472c1f441
Added support for controlling UNSUBSCRIBE calls in v5 plugin ACL checks.
2020-10-09 14:02:02 +01:00
Roger A. Light
6f4e0a1568
mosquitto_passwd: Forbid the ':' character in usernames.
2020-09-26 18:49:54 +01:00
Roger A. Light
c90e49af1b
Merge remote-tracking branch 'origin/fixes' into develop
2020-09-24 17:03:14 +01:00
Roger A. Light
54b9571516
Enable TLS with certfile+keyfile, not capath/cafile.
2020-09-23 23:31:00 +01:00
Roger A. Light
5371bd09d1
Add support for PBKDF2-SHA512 password hashing.
2020-09-23 22:57:26 +01:00
Roger A. Light
2774515456
Fix missing mach/mach_time.h header on OS X.
...
Closes #1831 . Thanks to P-Hagen.
2020-09-22 15:08:48 +01:00
Roger A. Light
97bd527df0
Breaking: allow_anonymous defaults to false.
2020-09-17 11:29:32 +01:00
Roger A. Light
d7d3087b04
Breaking: Bind to loopback if no listeners are configured.
2020-09-17 11:10:40 +01:00
Roger A. Light
a53712a14d
Don't use logging until log mutex is initialised.
...
Closes #1819 . Thanks to santoshks68.
2020-09-11 17:02:15 +01:00
Roger A. Light
298d84941e
Fix send quota being incorrecly reset on reconnect.
...
Closes #1822 . Thanks to Sarek.
2020-09-11 13:34:51 +01:00
Roger A. Light
56ba1b99db
Add mosquitto_ssl_get()
.
...
This allow clients to access their SSL structure and
perform additional verification.
2020-09-10 15:50:47 +01:00
Roger A. Light
e2123b2561
Add --version for all clients.
2020-09-10 15:49:08 +01:00
Roger A. Light
5daa5ee162
Add support for $CONTROL/ topics in plugins.
2020-09-10 15:32:47 +01:00
Roger A. Light
f0862e26ec
Add mosquitto_kick_client_by_clientid()
and mosquitto_kick_client_by_username()
...
These can be used by plugins to disconnect clients.
2020-09-07 13:51:44 +01:00
Roger A. Light
bab8cc2a6b
mosquitto_sub now supports extra format specifiers.
...
These are for field width and precision for some parameters.
2020-08-28 22:23:22 +01:00
Roger A. Light
39566e3a6a
Add 1.5.10 information.
2020-08-19 16:05:40 +01:00
Roger A. Light
c1b009e4df
Fix memory leak on handling QoS 2 PUBLISH.
...
In some circumstances, Mosquitto could leak memory when handling PUBLISH messages. This is limited to incoming QoS 2 messages, and is related to the combination of the broker having persistence enabled, a clean session=false client, which was connected prior to the broker restarting, then has reconnected and has now sent messages at a sufficiently high rate that the incoming queue at the broker has filled up and hence messages are being dropped. This is more likely to have an effect where max_queued_messages is a small value. This has now been fixed.
Closes #1793 . Thanks to mbates14.
2020-08-19 14:38:57 +01:00
Roger A. Light
b3b58cc635
Build warning fixes.
2020-08-19 14:04:02 +01:00
Roger A. Light
a224a8f217
Don't busy loop with mosquitto_pub -l
on a slow connection.
2020-08-13 14:32:47 +01:00
Roger A. Light
9929ce0a26
All clients exit with an error exit code on CONNACK failure.
...
Closes #1778 . Thanks to jflambert.
2020-08-12 09:44:42 +01:00
Roger A. Light
c9218fd48c
Bump version.
2020-08-11 12:05:32 +01:00
Roger A. Light
b3c2ac20dc
Fix overly broad HAVE_PTHREAD_CANCEL compile guard.
...
Closes #1547 . Thanks to Markus Gothe.
2020-08-11 11:02:38 +01:00
Roger A. Light
4b100df5b1
Fix reconnect+will delay interval issue causing missing messages.
...
Fix clients not receiving messages after a previous client with the same client ID and positive will delay interval quit.
Closes #1752 . Thanks to Jiří Zuzaňák.
2020-08-11 11:01:25 +01:00
Roger Light
60dc8f5e4c
Fix service path quoting on Windows.
...
https://bugs.eclipse.org/bugs/show_bug.cgi?id=565671
2020-08-11 09:09:31 +01:00
Roger Light
4ef48269f5
Fix mosquitto_loop_stop() not stopping on Windows
...
Closes #1748 . Closes #117 . Thanks to Sigmund Vik.
2020-08-11 08:55:05 +01:00
Roger A. Light
bd27935ff6
mosquitto_loop_start()
now sets a thread name.
...
This applies on Linux, FreeBSD, NetBSD, and OpenBSD.
Closes #1777 . Thanks to ABuch19.
2020-08-10 22:51:17 +01:00
Roger A. Light
94d04136f8
Fix potential memory leaks.
...
Closes #1773 . Closes #1774 . Thanks to Yingpei Zeng.
2020-08-06 21:28:09 +01:00
Roger A. Light
618cd7006b
Don't try to start DLT logging if DLT unavailable.
...
This is to avoid a long delay when shutting down the broker.
Closes #1735 . Thanks to Colin Law.
2020-08-04 11:17:04 +01:00
Roger A. Light
84e4ba2c1e
Send DISCONNECT with malformed-packet reason code on bad PUBLISHes.
2020-08-02 23:12:47 +01:00
Roger A. Light
b1e9377a20
Send DISCONNECT with malformed-packet reason code on bad SUBSCRIBEs.
2020-08-02 15:10:12 +01:00
Roger A. Light
8416b007ec
Send DISCONNECT with malformed-packet reason code on bad UNSUBSCRIBEs.
2020-08-02 14:22:40 +01:00
Roger A. Light
1f717873d6
Log protocol error message where appropriate from a bad UNSUBSCRIBE
...
Rather than the generic "socket error".
Related to #1765 .
2020-07-31 23:01:15 +01:00