Roger A. Light
4658dba6b3
Fix slow websockets performance when sending large messages.
...
Closes #1390 . Thanks to aalibasic.
6 years ago
Roger A. Light
4c4ca38938
Fix support for libwebsockets 3.x.
6 years ago
YangHau
abfdc2f8a6
Remove useless if statement
...
If statement for detecting if a pointer is NULL
is totally unnecessary.
Signed-off-by: YangHau <vulxj0j8j8@gmail.com>
6 years ago
Roger A. Light
50695f8103
Fix v5 DISCONNECT packets with remaining length == 2.
...
These were being treated as a protocol error.
Closes #1367 . Thanks to Frank Pagliughi.
6 years ago
Roger Light
07d2504bf5
Merge pull request #1254 from ccvca/fix_passwd_len
...
Fix password input when MAX_BUFFER_LEN is not 1024 in mosquitto_passwd.c
6 years ago
Roger A. Light
efc8ed39af
Fix incoming msgs not being removed when there are no subs
...
Fix incoming messages not being removed for a client if the topic being
published to does not have any subscribers.
Closes #1322 . Thanks to Yannic Schröder.
6 years ago
Roger A. Light
696a9b8019
Fix incomgin QoS 2 with max_inflight_messages set to 1.
...
Closes #1332 . Thanks to xmas79.
6 years ago
Roger A. Light
d17d7c9229
Fix persistent clients being incorrectly expired on Raspberry Pis.
...
Closes #1272 . Thanks to BowenMarmot and addendumE.
6 years ago
Matevz Mihalic
0a5fbc403b
Fix plugin psk_key_get for v4
...
Signed-off-by: Matevz Mihalic <matevz.mihalic@gmail.com>
6 years ago
Roger A. Light
587debc013
Fix incoming/outgoing quota problems for QoS>0.
6 years ago
Roger A. Light
142d07f45a
Fix MQTT v5 overlapping subscription behaviour.
...
Clients now receive message from all matching subscriptions rather than
the first one encountered, which ensures the maximum QoS requirement is
met.
6 years ago
Roger A. Light
de695af8c0
Fix zero length client ids being rejected for MQTT v5 clients.
...
This was happening when clean start was set to true.
6 years ago
Roger A. Light
e51e40e95c
Fix incorrect shared subscription topic of '$shared.'
6 years ago
Roger A. Light
b42bb99ba6
Disable TLS renegotiation.
...
Client initiated renegotiation is considered to be a potential attack
vector against servers.
Closes #1257 . Thanks to Daniele Sluijters.
6 years ago
Roger Light
44d170053d
Merge pull request #1255 from etactica/ssl-fixes
...
Ssl fixes for ENGINE and UI includes
6 years ago
Roger A. Light
96d0a26902
Only add to disused if session expiry is 0.
6 years ago
Roger A. Light
5088202529
Fix persistent Websockets clients not receiving messages.
...
This occurs after they reconnect, having sent DISCONNECT
on a previous session.
Closes #1227 . Thanks to usernametaken.
6 years ago
Roger A. Light
3dd8eb722b
Colour internal logs for visibility.
6 years ago
Roger A. Light
00eee59ad9
Add 'extern "C"' on public headers.
...
mosquitto_broker.h and mosquitto_plugin.h
Thanks to Wolfgang Petroschka.
Closes #1290 .
6 years ago
Roger A. Light
a900e3a1a7
Mention mosquitto_broker.h in mosquitto_plugin.h.
6 years ago
Roger A. Light
f974b91084
Consistent ref counting inc and dec functions.
6 years ago
Roger A. Light
b4dfeb3767
Fix MQTT v5 clients not being able to specify a password without a username.
...
Thanks to Erik Moqvist.
Closes #1274 .
6 years ago
Roger A. Light
999c478c88
Fixes for bug #1273
...
* Fix Will message for a persistent client incorrectly being sent when the client reconnects after a clean disconnect.
* Fix Will message for a persistent client not being sent on disconnect.
* Fix mosquitto_pub not using the `-c` option.
Thanks to Yannic Schröder.
Closes #1273 .
6 years ago
Roger A. Light
ef3e52d40b
Fix default max_topic_alias listener config not being used.
...
This was not being copied to the in-use listener when compiled without
TLS support.
6 years ago
Roger A. Light
cd3877e628
Fix detection of incoming v3.1/v3.1.1 bridges.
...
Closes #1263 . Thanks to vrst37.
6 years ago
Karl Palsson
22303848e2
ssl: support openssl with ENGINE support disabled.
...
Alternatively, just drop support for this config.
Signed-off-by: Karl Palsson <karlp@etactica.com>
7 years ago
Christian von Arnim
324ed6be76
Fix password input when MAX_BUFFER_LEN is not 1024 in mosquitto_passwd.c
...
Signed-off-by: Christian von Arnim <christian.vonarnim@gmail.com>
7 years ago
Roger A. Light
e742c1c2f1
Fix $SYS/broker/version being incorrectly expired after 60 seconds.
...
Close #1245 . Thanks to Christoph Krey.
7 years ago
Roger A. Light
f64d3b1e5c
Fix broker originated messages not being sent.
...
This occurred when `check_retain_source` was set to true.
Closes #1245 . Thanks to Christoph Krey.
7 years ago
Roger A. Light
a9f17cea95
Fix Will message not allowing user-property properties.
7 years ago
Roger A. Light
eebdbc86c4
Fix access after free when v5 client with Will message disconnects.
...
The Will message has as its first property one of content-type,
correlation-data, payload-format-indicator, or response-topic.
Closes #1244 . Thanks to Christoph Krey.
7 years ago
Roger A. Light
42fb2f5538
Fix build for WITH_TLS=no.
...
Closes #1250 . Thanks to bmparr.
7 years ago
Roger A. Light
439575475c
Use CMAKE_INSTALL_* variables when installing in CMake.
...
Closes #1049 . Thanks to Greg Troxel.
7 years ago
Roger A. Light
efa649f451
Don't call ldconfig in CMake scripts.
...
Closes #1048 . Thanks to Greg Troxel.
7 years ago
Roger A. Light
3b4a5419c3
Build fixes around CFLAGS et al.
...
- Split CFLAGS and CPPFLAGS, and LDFLAGS and LDADD/LIBADD.
- test/unit now respects CPPFLAGS and LDFLAGS.
Closes #1232 . Thanks to Greg Troxel.
7 years ago
Roger A. Light
4dcd977932
Windows build fixes.
7 years ago
Roger A. Light
449103e960
Merge remote-tracking branch 'refs/remotes/origin/fixes'
...
Conflicts:
ChangeLog.txt
7 years ago
Roger A. Light
3e6cb42a40
Fix minor Coverity issues
...
1400727 - unused value
1400726 - dereference after null check
1400728 - derefence before null check
7 years ago
Roger A. Light
689989cc56
Fix inflight quota inc/dec for both broker and library.
7 years ago
Roger A. Light
6438ce861e
Minor build variant fixes.
7 years ago
Roger A. Light
32fde3885c
Fix missing errors for websockets.
7 years ago
Roger A. Light
8531cb1d79
Separate broker message queues into in/out.
...
This allows and includes better flow control handling for QoS>0.
7 years ago
Roger A. Light
baf1909ffb
Improve some messages when client disconnects.
7 years ago
Roger A. Light
fb1979c0ea
Fix build on SmartOS due to missing IPV6_V6ONLY.
...
Thanks to Matt Ingenthron.
Closes #1212 .
7 years ago
Roger Light
77aaec686e
Merge pull request #1224 from omenlabs/ALPN
...
Bridge TLS Application-Layer Protocol Negotiation
7 years ago
Roger A. Light
638ab2f969
Fix unexpected behaviour when reusing a mid after a publish is denied.
7 years ago
Roger A. Light
8a651ff6c3
Remove remnant from before the conversion to utlist.
7 years ago
Roger A. Light
ad3b7ec778
Fix Coverity Scan 1400486-1400487. Unused values.
7 years ago
Roger A. Light
0d3c7fe778
Fix Coverity 1302840. No effect comparison.
7 years ago
Roger A. Light
e4d0d52b01
Fix Coverity Scan 1400483-1400485.
...
Logically dead code.
7 years ago
John Hickey
c011be62a4
Bridge TLS Application-Layer Protocol Negotiation
...
In order to connect to brokers that support both websockets and
mqtt on the same port (such as Amazon IoT), we need to set an
application for the SSL context. This change allows the specification
of an application by using the `bridge_alpn` configuration token.
Signed-off-by: John Hickey <jjh-github@daedalian.us>
7 years ago
Roger A. Light
2e7dcee342
Multistep auth, plus reauth, plus tests.
7 years ago
Roger A. Light
c1776a0b39
Add reauth parameter for extended auth.
7 years ago
Roger A. Light
0f6e51d582
Code and tests for returning single stage auth data back to client.
7 years ago
Roger A. Light
494f35bd8d
Add mosquitto_set_username() plugin function.
7 years ago
Roger A. Light
a29a7dadc6
Basic plugin support for single step extended auth.
7 years ago
Roger A. Light
da84b9a983
Restrict what packets are allowed in what client state.
7 years ago
Roger A. Light
758e1edbe7
Handle error condition correctly.
7 years ago
Roger A. Light
fb8a2baaad
Refactor client msgs to use utlist to reduce code complexity.
7 years ago
Roger A. Light
8097ec24f9
Fix some property leaks.
7 years ago
Roger A. Light
fe854d3a64
Refactor handle__connect() ahead of extended auth changes.
7 years ago
Roger A. Light
73cd44ac7f
Move handle__disconnect() to its own file.
7 years ago
Roger A. Light
ec3fd361be
https links where possible.
7 years ago
Roger A. Light
75c2a39d2c
Send topic alias maximum from the broker.
7 years ago
Roger A. Light
12e5efbee2
Typo.
7 years ago
Roger A. Light
ea046c2405
Merge branch 'master' of git://github.com/LarsVoelker/mosquitto into LarsVoelker-master
7 years ago
Roger A. Light
834ffdf82b
Fix Coverity Scan defect 1400435.
7 years ago
Roger A. Light
0ca093060c
Fix Coverity Scan defect 1400433. Integer overflow.
7 years ago
Roger A. Light
9faad1e078
Fix a variety of scan-build warnings.
7 years ago
Roger A. Light
67707b819d
Fix some -Wextra compiler warnings.
7 years ago
Roger A. Light
2a5995106a
Fix Coverity Scan defect 140436. Null dereference.
7 years ago
Roger A. Light
87197bf9d4
Fix Coverity Scan defect 1400441, dereference of pointer after earlier null check.
7 years ago
Roger A. Light
42732f4cca
Fix mosquitto_passwd segfault on corrupt file.
...
Thanks to srasku-ge.
Closes #1207
7 years ago
Roger A. Light
43c159b9a5
Support and tests for saving message expiry interval.
7 years ago
Roger A. Light
61fe26474e
Test and fix for client message prop persistence.
7 years ago
Roger A. Light
5841da2c36
Tests for persisting message store properties.
7 years ago
Roger A. Light
efb20625fb
Code and tests for persisting client msg properties.
7 years ago
Roger A. Light
c95ae6a6fd
Remove one instance of recursion.
7 years ago
Roger A. Light
48253bc12c
Persist message store publish properties.
7 years ago
Roger A. Light
2f15a7be2b
Add subscription-identifier and options to persistence.
7 years ago
Roger A. Light
214a5f3aab
v5 persistence file format
...
This includes changes to improve read/write performance.
It is not complete, and will have further changes to add properties and anything else required for MQTT v5.
7 years ago
Roger A. Light
a0e54ac065
Function for reading persist file chunk header.
7 years ago
Roger A. Light
ee5412b060
Persist write fix.
7 years ago
Roger A. Light
a50d129a3c
Fix db_dump.
7 years ago
Roger A. Light
e249ca7e91
Separate the persistence actual writing functions.
7 years ago
Roger A. Light
7a53b28080
Start of persistence writing tests.
7 years ago
Roger A. Light
54a35ed0ed
Free clients with >0 session expiry on exit.
7 years ago
Roger A. Light
94450eb8bc
Keep log open until we are ready to quit.
7 years ago
Roger A. Light
8024a30d1d
Fix potential leak.
7 years ago
Roger A. Light
c90bd4e0c6
Add helper function for internal debug logging.
7 years ago
Roger A. Light
b29c8ced55
Fix compilation warning for WITH_WEBSOCKETS=no.
7 years ago
Roger A. Light
ad2ce6c4e6
Add internal logging type, for development debugging.
7 years ago
Roger A. Light
c5699da5ce
Don't remove unused websockets contexts until lws is finished with them.
7 years ago
Roger A. Light
0ced003880
Always remove from by_id when adding to disused list.
7 years ago
Roger A. Light
320ddc1303
Merge branch 'master'
...
Conflicts:
CMakeLists.txt
ChangeLog.txt
client/Makefile
config.mk
installer/mosquitto.nsi
installer/mosquitto64.nsi
lib/mosquitto.h
lib/mqtt3_protocol.h
lib/util_mosq.c
set-version.sh
snap/snapcraft.yaml
src/bridge.c
src/database.c
src/handle_connack.c
src/loop.c
src/persist.c
test/broker/Makefile
7 years ago
Roger A. Light
a7d0660749
Separate out persist reading code from restoring code.
7 years ago
Roger A. Light
110f4aada6
Don't overwrite disused client state.
7 years ago
Roger A. Light
9411d94842
Start of tests for persistence reading.
7 years ago
Roger A. Light
b6356735b4
Split persist read/write into separate files for easier testing.
7 years ago
Roger A. Light
c944f840a6
Don't advertise shared subs as unavailable any more.
7 years ago
Roger Light
8a8d13cf96
Shared subscription support.
7 years ago
Roger A. Light
173b209bd8
Remove unnecessary calls to time().
7 years ago
Roger A. Light
89f51aa54a
Search sub topics, don't iterate (where possible).
7 years ago
Roger A. Light
2dd24449ad
Fix "unused parameter" warnings.
7 years ago
Roger A. Light
0941638143
Fix signed/unsigned comparion warnings.
...
Closes #1196 .
7 years ago
Roger A. Light
b82370a997
Free clients with session expiry > 0 on exit.
7 years ago
Roger A. Light
08249313a4
Don't leak sockets.
7 years ago
Roger Light
1a234323a3
Add support for custom log timestamps.
...
Closes #1121 .
7 years ago
Vinod Kumar
e9350fbb56
print error when listener bind address is not valid
...
Signed-off-by: Vinod Kumar <kumar003vinod@gmail.com>
7 years ago
Roger Light
a57bba0aae
Don't use uhpa for topics, incompatible with uthash.
7 years ago
Roger A. Light
2ea97a6cd9
Check for authentication method on CONNECT, and reject.
7 years ago
Roger A. Light
ac91144495
Session expiry interval support - not working for file persistence.
7 years ago
Roger A. Light
cd07c2b802
Windows build fixes.
7 years ago
Roger A. Light
105ad17dc6
Tests and support for QoS 1 reporting of no subscribers on publish.
7 years ago
Roger A. Light
6a1ac70ee6
Disallow writing to $ topics where appropriate.
7 years ago
Roger A. Light
1d4bf55165
Tidy previous commit and add to changelog.
7 years ago
Roger Light
bb6da93e93
Merge pull request #993 from bbabbi01/origin/develop
...
Implement DLT logging
7 years ago
Roger A. Light
ce31269e05
Update changelog, bump version, bump copyright year.
7 years ago
Roger A. Light
7207041428
Fix delayed bridge local subs causing missing messages.
...
Closes #1174 . Thanks to beville.
Bug: https://github.com/eclipse/mosquitto/issues/1174
7 years ago
Roger A. Light
acf478eca2
Fix broken mosquitto_passwd on FreeBSD.
...
Closes #1032 . Thanks to jkoopman, Joseph Benden and Ari Suutari.
Bug: https://github.com/eclipse/mosquitto/issues/1032
7 years ago
Roger A. Light
a6f845bc67
Fix openssl deprecated function use.
7 years ago
Roger A. Light
4490d06a63
Coverity fixes.
...
1398654, 1398656 - lib missing unlock on fatal protocol error
1398655 - broker potential double free on startup after fatal persist
error.
7 years ago
Roger A. Light
d3d6f3a980
Fix compiling with openssl < 1.1.1.
7 years ago
Roger A. Light
463de0a2c1
Make error messages for missing config file clearer.
7 years ago
Roger A. Light
0632549ce9
Doc improvements for websockets_header_size.
7 years ago
Pierre Fersing
1aaf5f2348
Add websockets_headers_size option
...
Signed-off-by: Pierre Fersing <pierre.fersing@bleemeo.com>
7 years ago
Roger A. Light
1924afe49e
Add explicit support for TLS v1.3 and drop TLS v1.0.
7 years ago
Roger A. Light
130ddf47f7
Add `dhparamfile` option, to allow DH parameters to be loaded.
...
This is for Ephemeral DH support on listeners.
7 years ago
Roger A. Light
4564ff1232
Set umask for temp file.
7 years ago
Roger A. Light
87b3ca35f1
Use mkstemp with mosquitto_passwd on non-Windows.
7 years ago
Roger A. Light
48d731ecb5
Use better random numbers for everything, where possible.
7 years ago
Roger A. Light
dfbd33e0f4
Update documentation for bridge backup, plus tweaks
...
Sets default to use the backoff mechanism.
7 years ago
Abilio Marques
87eb535307
bridge: add decorrelated jitter backoff mechanism
...
Signed-off-by: Abilio Marques <abiliojr@gmail.com>
7 years ago
Roger A. Light
72941db546
Coverity fixes
...
1399064
1399065
1398655
1398656
1398654
1399067
1399066
1399063
1399060
1399059
1399068
1399062
1398657
1398653
1302848
1302847
1399070
7 years ago
Steven Lawrance
208c3d3e85
Allow binding a listener to a specific network interface
...
Signed-off-by: Steven Lawrance <stl@koffein.net>
7 years ago
Roger A. Light
b2c0c3d573
Handle DISCONNECT with will.
7 years ago
Roger A. Light
3b6b6d5fa8
Test improvements
...
And some related fixes.
7 years ago
Roger A. Light
c506c8335b
Will delay tests and implementation.
7 years ago
Roger A. Light
b0c60fb6e1
Separate will reading code.
7 years ago
Roger A. Light
5aabc171b0
Merge branch 'mqtt5' into develop
7 years ago
Roger A. Light
e862a047a8
Rework TLS engine support.
7 years ago
Nicolás Pernas Maradei
20894fcbce
Add engine private key password support
...
Some OpenSSL engines (selectable via tls_engine option) may require a
password to make use of private keys created with them in the first place.
The TPM engine for example, will require a password to access the underlying
TPM's Storage Root Key (SRK), which is the root key of a hierarchy of keys
associated with a TPM; it is generated within a TPM and is a non-migratable
key. Each owned TPM contains a SRK, generated by the TPM at the request
of the Owner. [1]
By default, the engine will prompt the user to introduce the SRK password
before any private keys created with the engine can be used. This could
be inconvenient when running on an unattended system.
Here's where the new tls_engine_kpass_sha option comes in handy. The user
can specify a SHA1 hash of its engine private key password via command
line or config file and it will be passed on to the engine directly.
This commit adds support for both clients (libmosquitto) and broker.
[1] https://goo.gl/qQoXBY
Signed-off-by: Nicolás Pernas Maradei <nicopernas@gmail.com>
7 years ago
Nicolás Pernas Maradei
d5f039ec7c
Add TLS engine and keyform support to mosquitto
...
Add same OpenSSL engine support to mosquitto (server side) previously added to
client side only.
Signed-off-by: Nicolás Pernas Maradei <nicopernas@gmail.com>
7 years ago
Roger A. Light
c3c8c99f5d
Fix dropping oversize messages for QoS>0.
7 years ago
Roger A. Light
1d17ced449
Broker configurable max_packet_size
...
Plus tests.
7 years ago
Roger A. Light
1877f8a326
Tests and implementation for maximum packet size.
...
This is for broker outgoing connack and publish packets only.
7 years ago
Roger A. Light
8db16591fa
Test and fix for subscription identifiers not being updated.
...
Closes #1169 . Thanks to Christoph Krey.
7 years ago
Roger A. Light
66c1e2ccf0
Add mosquitto_unsubscribe_multiple(), plus tests.
7 years ago
Roger A. Light
1479c57e34
v5 report reason code=no sub when unsubscribing.
7 years ago
Roger A. Light
1ec0cea34a
Fix missing reason_code on v5 UNSUBACK.
...
Closes #1167 . Thanks to Christoph Krey.
7 years ago