Commit Graph

1270 Commits (master)

Author SHA1 Message Date
Roger A. Light 238b68686a Fix bridge pollfd corruption on Windows.
Closes #2173. Thanks to Niclas Lindgren.
4 years ago
Roger A. Light 104b94db57 Fix non-reachable bridge blocking the broker on Windows.
Closes #2172. Thanks to Niclas Lindgren.
4 years ago
Roger A. Light 5851713f3e Refactor to remove duplicate code. 4 years ago
Roger A. Light 0e1388a615 Fix the return of plugin__handle_message not being fully handled. 4 years ago
Roger A. Light 90e3b287de Remove redundant check, this is handled in send__pubrec. 4 years ago
Roger A. Light 16fb0025a7 Improve QoS 0 outgoing packet queueing. 4 years ago
Roger A. Light 0db306ef6b Fix compiler warning. 4 years ago
Roger A. Light 4a08626f43 Only a single call to lws_write() is required. 4 years ago
Roger Light 880df7360d Fix bridge not reconnectng if the first reconnection attempt fails.
Closes #2207. Thanks to Abilio Marques.
4 years ago
Roger A. Light 501690d312 Handle identifier==NULL case. 4 years ago
Roger Light e1c8f09372 Remove C++ style comments. 4 years ago
Roger Light 5434931dbc Merge branch 'fixes' of git://github.com/bk138/mosquitto into bk138-fixes 4 years ago
Roger A. Light 0446bba7df Fix some conversion warnings. 5 years ago
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>
5 years ago
Roger Light 702aaabee2 mux init must happen before bridges are started. 5 years ago
Roger Light c418b57d0f Fix possible crash having just upgraded from 1.6.
Happens if `per_listener_settings true` is set, and a SIGHUP is sent to
the broker before a client has reconnected to the broker.

Closes #2167. Thanks to momoskitto.
5 years ago
Roger A. Light 983dc14f2c Provide help for users trying to bind to privileged ports.
Closes #2098.
5 years ago
Roger A. Light 6a4a547892 Fix segfault on client sending malformed CONNACk.
CVE-xxxx-xxxx: If an authenticated client connected with MQTT v5 sent a
malformed CONNACK message to the broker a NULL pointer dereference occurred,
most likely resulting in a segfault. This will be updated with the CVE
number when it is assigned.
Affects versions 2.0.0 to 2.0.9 inclusive.

Closes #2163. Thanks to Bryan Pearson.
5 years ago
Roger Light 2de8c15bc9 Minor build fixes. 5 years ago
Roger Light cca41d176d Fix inconsistent sign in log__printf declaration. 5 years ago
Roger Light 9989a3502d Add link to authentication options if running in local only mode. 5 years ago
Roger Light a6bb8d3611 Don't over write new receive-maximum if a v5 client connects.
This is for when it takes over an old session.

Closes #2134. Thanks to Frantisek Fuka.
5 years ago
Roger A. Light 891be8c2fe Fix `max_keepalive` option not applying to keepalive=0.
Closes #2117. Thanks to David Nadlinger.
5 years ago
Roger A. Light 720ce01faf Minor tweaks to PR. 5 years ago
Roger A. Light 87cf3680e5 Merge branch 'master' of git://github.com/vidarino/mosquitto into vidarino-master 5 years ago
Roger A. Light f4d088b6d0 Improve logging of pull request.
Improve handling of invalid combinations of listener address and bind
interface configurations. Closes #2081.
5 years ago
Roger A. Light 095d6e1caa Merge branch 'mosterdt-fix_interface_binding' into fixes 5 years ago
Roger A. Light 88d2c74ab2 Fix bridge backoff calculation. 5 years ago
Roger A. Light 4b0a4c5c08 Merge branch 'fix-backoff' of git://github.com/abiliojr/mosquitto into abiliojr-fix-backoff 5 years ago
Roger A. Light 8a5de787a7 Merge branch 'fix_interface_binding' of git://github.com/mosterdt/mosquitto into mosterdt-fix_interface_binding 5 years ago
Roger A. Light b7a08d5c40 Fix TLS bridge/lib incorrectly connecting on invalid CA file.
Closes #2130. Thanks to becz.
5 years ago
Roger Light ace2aa764e Fix cmake epoll detection. 5 years ago
Roger A. Light e401def06d Fix QoS 0 messages not being delivered when max_queued_bytes was configured.
Closes #2123. Thanks to quackgizmo.
5 years ago
Roger A. Light f89a3c3fc0 Fix messages to `$` prefixed topics being rejected.
Closes #2111. Thanks to yellowgg2.
5 years ago
Roger Light 64f697d55d Fix `tls_version` behaviour not matching documentation.
It was setting the exact TLS version to use, not the minimium TLS
version to use.

Closes #2110. Thanks to Petter Jönsson.
5 years ago
Abilio Marques 2a38b7115b brige: fix backoff not working for remote broker returned errors
Signed-off-by: Abilio Marques <abiliojr@gmail.com>
5 years ago
Vidar Madsen ebfcc84cda Add new function to header. Minor tweaks.
Signed-off-by: Vidar Madsen <vidarino@gmail.com>
5 years ago
Vidar Madsen 6bea9f7b32 Handle stale stored messages with conflicting message IDs.
Signed-off-by: Vidar Madsen <vidarino@gmail.com>
5 years ago
Roger A. Light 1b24f625ea Give compile time warning for libwebsockets
If it is compiled without external poll support.

Closes #2060. Thanks to Yannic Schröder.
5 years ago
Thomas De Backer fd2f764d36 Check host address binding before overwriting
Signed-off-by: Thomas De Backer <mosterdt@debacker.me>
5 years ago
Thomas De Backer 764aa4e8dc Correct interface binding
Signed-off-by: Thomas De Backer <mosterdt@debacker.me>
5 years ago
Roger A. Light 4a738f154e Fix openssl engine not being able to load private key.
Closes #2066. Thanks to Boris Vanhoof.
5 years ago
Roger A. Light 7a3b69f2d7 Fix possible leak during connect.
Closes #2057. Thanks to Przemysław Zygmunt.
5 years ago
Roger A. Light 1e6be1f123 Fix some minor memory leaks on exit only. 5 years ago
Roger A. Light 2749b8c5b8 Merge branch 'fixes' 5 years ago
Roger A. Light 6e3738dcf0 Fix bridges not always connecting on Windows.
Closes #2043. Thanks to ttsorensen.
5 years ago
Roger A. Light 706a1f3f29 Fix more minor compiler warnings. 5 years ago
Roger A. Light cda84950bb Fix mux_epoll__handle() use. 5 years ago
Roger A. Light a4389fc9ce Fix SPDX identifiers: EDL-1.0 -> BSD-3-Clause.
The two licenses are the same.
5 years ago
Roger A. Light cf1098eff1 Send protocol error on topic alias not found.
The error topic-alias-invalid was being sent if an MQTT v5 client published
a message with empty topic and topic alias set, but the topic alias hadn't
already been configured on the broker. This has been fixed to send a
protocol error, as per section 3.3.4 of the specification.
5 years ago
Roger A. Light 3c58ac9308 Fix `message_size_limit` not applying to the Will payload.
Closes #2022. Thanks to Umberto Morelli.
5 years ago
Roger A. Light 4165224885 Fix reloading of listeners where multiple listeners have the same port.
This is only possible where they have different bind addresses.

Closes #2029. Thanks to Simon Aldrich.
5 years ago
Roger A. Light e2ebddfc54 Improve logging in obscure cases when a client disconnects.
Closes #2017. Thanks to Craig Leres.
5 years ago
Roger A. Light 00083623f0 Fix websockets listeners with TLS not responding.
Closes #2020. Thanks to FozzTexx.
5 years ago
Roger A. Light b8c6f26995 Fix message expiry interval property not being honoured for plugins.
This happened in `mosquitto_broker_publish` and
`mosquitto_broker_publish_copy` only.
5 years ago
Roger A. Light 4be32aefc6 Fix potential duplicate Will messages being sent.
This could have occurred when a will delay interval had been set.
5 years ago
Roger A. Light 695bbc33c8 Fix calculation of remaining length parameter for websockets clients.
Only affects those clients that send fragmented packets.

Closes #1974. Thanks to 贺亚东.
5 years ago
Roger A. Light 09a870c342 Better behaved lws external poll code. 5 years ago
Roger Light 4a114c6151 Remove unused struct member. 5 years ago
Roger A. Light 370cec5edd Fixes for lots of minor build warnings highlighted by Visual Studio. 5 years ago
Roger Light 886ee6cd0c Fix `bind_interface` option.
Closes #1999. Thanks to Joerg55.
5 years ago
Roger A. Light 93c730f799 Fix potential intermittent initial bridge connections when using poll(). 5 years ago
Roger A. Light a69f125b80 No need to clear memory outside of condition. 5 years ago
Roger A. Light 86e0122a2d Only add/remove poll events when they aren't already done. 5 years ago
Roger A. Light 9d3732a62d Fix `auth_method` not being provided to the extended auth plugin event.
Closes #1975. Thanks to Jinming Chen.
5 years ago
Roger A. Light 7fc472232c Merge branch 'fixes' 5 years ago
Roger A. Light 97d9f471c3 Fix websockets connections blocking non-ws connections on Windows.
Closes #1934. Thanks to sectokia and jarapa9.
5 years ago
Roger A. Light ce30f811ba Improve API documentation.
Fix return code on callback unregister.
5 years ago
Roger A. Light 0ec258d01f Fix incorrect string length calculation.
Closes #1963. Thanks to twegener-embertec.
5 years ago
Roger A. Light f930970008 Fix persistence_location not appending a '/'. 5 years ago
Roger A. Light f10de9831a Fix slow initial bridge connections for WITH_ADNS=no. 5 years ago
Roger A. Light 1d92184b2f Fix local bridges being disconnected on SIGHUP.
Closes #1942. Thanks to charlemagnelasse.
5 years ago
Roger A. Light 00c68203b8 Fix QoS 0 messages not being delivered if max_queued_messages was set to 0.
Closes #1956. Thanks to nduhme.
5 years ago
Roger A. Light d05a49a2cf Fix bridges possibly not completing connections when WITH_ADNS is in use.
Closes #1960. Thanks to twegener-embertec.
5 years ago
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.
5 years ago
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.
5 years ago
Roger A. Light ecf6f9079a Fix build regression for WITH_WEBSOCKETS=yes on non-Linux systems. 5 years ago
Roger A. Light 757902bcf8 Improve struct packing. 5 years ago
Roger A. Light 37ce51703f Fix websockets listeners not causing the main loop not to wake up.
Closes #1936. Thanks to sectokia.
5 years ago
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.
5 years ago
Roger A. Light 9968e35981 Fix websockets connections on Windows blocking subsequent connections.
Closes #1934. Thanks to sectokia.
5 years ago
Roger A. Light 74faabc7c1 Fix invalid free 5 years ago
Roger A. Light c25229c13a Fix build using WITH_TLS=no when the openssl headers aren't available. 5 years ago
Roger A. Light 09ee0c31f5 Build fix for Xcode 12.
Closes #1831. Thanks to Tristan79 and andreas-kluge.
5 years ago
Roger A. Light 1636e47202 libressl does not support SSL_CTX_set_ciphersuites. 5 years ago
Roger A. Light ea1d496299 Reply to $CONTROL QoS>0 msgs even if WITH_CONTROL disabled. 5 years ago
Roger A. Light 27a160d127 Enable WITH_CONTROL in cmake. 5 years ago
Roger A. Light 26ffe1300a Various Windows build fixes. 5 years ago
Pierre Hallot 8f0bdd5fd3 Find package libwebsockets if the option is ON.
Otherwise, if the package is not installed, configuration will work, but building will fail.

Signed-off-by: Pierre Hallot <hallotpierre@gmail.com>
5 years ago
Roger A. Light 828e7ae130 More conversion fixes. 5 years ago
Roger A. Light df1802d8f1 Fix client state conversion warnings. 5 years ago
Roger A. Light 9e6efd2f32 Stop listeners before removing clients to avoid use after free. 5 years ago
Roger A. Light 232a759320 Log client port on new connections.
Closes #1911. Thanks to twegener-embertec.
5 years ago
Roger A. Light a7f044bcea Respect receive-maximum on bridges. 5 years ago
Roger A. Light 3731535298 Add SPDX license identifiers. 5 years ago
Roger A. Light 04c110183c Bridge support for MQTT v5 maximum-qos. 5 years ago
Roger A. Light ca4b23486b Bridges now obey MQTT v5 server-keepalive. 5 years ago
Roger A. Light e030ca45cd Fix connack error printing. 5 years ago
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.
5 years ago
Roger A. Light b34dcd2a67 Final remove support for legacy libwebsockets
This means libwebsockets < 2.4.0.
5 years ago