Commit Graph

591 Commits (b8b1674183ae4a451677cf0320222c1c53dc7f06)

Author SHA1 Message Date
Kai Buschulte 0fe397603b Workaround problem with sqlite3-wal files
These files are not removed but empty for some versions of sqlite3

Signed-off-by: Kai Buschulte <kai.buschulte@cedalo.com>
3 years ago
Kai Buschulte 4eadc96bcb Add Traceback to failing packet_match
This helps finding the caller/cause of the failure

Signed-off-by: Kai Buschulte <kai.buschulte@cedalo.com>
3 years ago
Norbert Heusser 71e1b92564 Fixed race condition in test/broker/11-persistent-subscription-no-local.py 3 years ago
Roger Light 6c1bb33e86
Merge pull request #2573 from buschulte/throw-broken-pipe-error-when-loosing-connection
throw BrokenPipeError if nothing received on socket
3 years ago
Roger A. Light 34391080d6 Add dynsec init by simple file. 3 years ago
Kai Buschulte a7304083f8 throw BrokenPipeError if nothing received on sock
instead of ignoring this error, we throw an exception
the previous way might cause hard to find issues

Signed-off-by: Kai Buschulte <kai.buschulte@cedalo.com>
3 years ago
Roger A. Light 3e1cf8a80b Fix tests build. 3 years ago
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
3 years ago
Norbert Heusser 6fbf6fc5cb
Merge branch 'eclipse:develop' into develop 3 years ago
Roger A. Light 4487b98dbb Fix clean 3 years ago
Norbert Heusser 6150ae6560 Remove mosquitto__set_state after error from send__connect in mosquitto__reconnect to
fix failing test test/lib/02-subscribe-qos1.py $@/02-subscribe-qos1-async2.test

Signed-off-by: Norbert Heusser <norbert.heusser@cedalo.com>
3 years ago
Norbert Heusser 306b76d7f6 Create github build action to build Mosquitto and added timeout
to python tests waiting for subprocess to avoid github actione being blocked

Signed-off-by: Norbert Heusser <norbert.heusser@cedalo.com>
3 years ago
Roger A. Light 4fd51e9681 Fix incorrect earlier commit 3 years ago
Roger A. Light 4c72542eae Move mosquittopp header to include dir. 4 years ago
Roger A. Light 8a9d8ece37 Fix sqlite test 4 years ago
Roger A. Light 0433b8ee9b Update changelog, fix usage of m_set_clientid(), add test. 4 years ago
Roger A. Light b4a0255f1c Process retain persist events only every 10 seconds. 4 years ago
Roger A. Light 1bb16a68dc Test fixes for running under valgrind 4 years ago
Roger A. Light cbb01193a0 Rename persist retain_add to retain_set 4 years ago
Roger A. Light 2d3b152a22 Rename of mosquitto_msg_store struct.
struct mosquitto_msg_store -> struct mosquitto_base_msg

This is the base message which client messages and retained messages
refer to. The base messages are still held in the message store.

This change comes about because the persistence interface exposes these
message types. Prior to this commit the different messages were "msg",
"client_msg", and "retain". After this commit there is "base_msg",
"client_msg", and and "retain_msg" in the persist interface.
4 years ago
Roger A. Light 41b1b0c6d1 Merge branch 'XavierDooms-fix-support-tick-with-per-listener-settings' into fixes 4 years ago
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 4 years ago
Norbert Heusser e7e8b6e832 * Added list of connections to dynsec/getClient response
* Added new helper function mosquitto_apply_on_all_clients to broker
* Refactoring in dynamic-security plugin

Signed-off-by: Norbert Heusser <norbert.heusser@cedalo.com>
4 years ago
Olivier Gayot b7fb911428 tests: replace use of ssl.wrap_socket that throws warnings in Python 3.10
The function ssl.wrap_socket() is deprecated starting Python 3.7 because
it does not support hostname matching (which is considered insecure). In
Python 3.10, the function now throws warnings at runtime, which makes
Ubuntu / Debian autopkgtest fail.

The function ssl.SSLContext.wrap_socket comes in as the replacement and
has support for SNI and hostname matching.

Replaced all uses of ssl.wrap_socket() by equivalent using
ssl.SSLContext.wrap_socket().

Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
4 years ago
Roger A. Light 3bb8be6ea2 Client tests should not run in parallel. 4 years ago
Roger A. Light ffb7661d86 Move shared code to common directory
This is currently limited to "utility" type functions and does not include code common to the library and broker that are protocol related.
4 years ago
Roger A. Light 5a3b42d4a4 Use path vars in Makefiles. 4 years ago
Roger A. Light df2a4a666f Add missing hunk from previous commit. 4 years ago
Roger A. Light 6f8ced5038 Test fixes. 4 years ago
Roger A. Light c87148ac3e userdata function testing. 4 years ago
Roger A. Light 92c6fcf547 Tests should exit gracefully rather than being terminated. 4 years ago
Roger A. Light 5e601c3853 Library connect tests. 4 years ago
Roger A. Light 3ce8de32ff Fix typo 4 years ago
Roger A. Light 223d9eae66 mosquitto_sub json output tests, and user-properties fix. 4 years ago
Roger A. Light 5006943d9a 'mosquitto_pub -f' and 'mosquitto_pub -L' tests. 4 years ago
Roger A. Light 57ef2be8d3 More client tests. 4 years ago
Roger A. Light 6051a65f51 mosquitto_pub stdin file and line tests. 4 years ago
Roger A. Light 7d9aba112c Remove unused start_broker checks. 4 years ago
Roger A. Light 74b9ed0808 More client tests. 4 years ago
Roger A. Light 9b2c64135f listPlugins command, and test. 4 years ago
Roger A. Light 82658805c7 listListeners command. 4 years ago
Roger A. Light db6b59a336 sqlite retain clear test. 4 years ago
Roger A. Light 73f03983fb Socks proxy test plus fixes. 4 years ago
Roger A. Light ab67dbcacd More client tests, and an output format fix. 4 years ago
Roger A. Light 3139eb3252 More client tests. 4 years ago
Roger A. Light a96615bd4a More client tests. 4 years ago
Roger A. Light dc906c5221 Sqlite persistence plugin. 4 years ago
Roger A. Light 0a0f4ead42 Plugin interface interface and test improvements. 4 years ago
Roger A. Light 33f2817b1e Facility for running tests under failgrind. 4 years ago
Roger A. Light d546ba461a Test fixes. 4 years ago
Roger A. Light ea553619fb Basic client websockets tests. 4 years ago
Roger A. Light eefafdeff7 Fix unix socket test. 4 years ago
Roger A. Light e25cb05fc9 Command arg tests. 4 years ago
Roger A. Light 1ac099ebdd More config parse errors. 4 years ago
Roger A. Light 2d045dbc85 Fix option name. 4 years ago
Roger A. Light 7bd9c5cce1 More config parse error tests. 4 years ago
Roger A. Light 5fab104467 Auth plugin v2, v3 testings. 4 years ago
Roger A. Light 4cd2f85e77 Unix socket connect test. 4 years ago
Roger A. Light aa7e09948b Start of config file parsing error tests. 4 years ago
Roger A. Light 249edc6ba2 include_dir test. 4 years ago
Roger A. Light 93ed5721e2 No need to set keepalive in most tests. 4 years ago
Roger A. Light 6e8925c062 Test fix. 4 years ago
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>
4 years ago
Roger A. Light 0f9e5dc65d Improve test. 4 years ago
Roger A. Light 0f8733627a Plugin persistence interface. 4 years ago
Roger A. Light 2501a64035 Merge branch 'master' into develop 4 years ago
Roger A. Light affe6ece83 Add client msg int to allow easier ordering for plugins. 4 years ago
Roger A. Light 11975332d4 Fix mosquitto_topic_matches_sub2() not using the length parameters.
Closes #2364. Thanks to Jens Alfke.
4 years ago
Roger A. Light 0d0a36906c Add missing stubs. 4 years ago
Roger A. Light e09390eda6 Split db__message_insert into incoming/outgoing. 4 years ago
Roger A. Light 9ad8d943be Stored messages now always stored in a hash table. 4 years ago
Roger A. Light 786d468570 MID reuse test. 4 years ago
Roger A. Light 34b41a3b01 Dynsec: Add ability to deny wildcard subscriptions for a role 4 years ago
Roger Light dcff8dfd38 Implement plugin wrappers for v2, v3, v4
This means the internal plugin interface is simpler and is translated to each of the older interfaces if needed.
4 years ago
Roger Light 3ebc4f851c Fix test. 4 years ago
Roger A. Light a1288721ce Fix tests 4 years ago
Roger A. Light 8ac11929cc Merge branch 'master' into develop 4 years ago
Roger A. Light b9b065d2cc Compiler pedantry, and more checks in tests. 4 years ago
Roger Light 9d3f292b39 Send DISCONNECT With session-takeover return code.
This is for MQTT v5 clients when a client connects with the same client id.

Closes #2340. Thanks to hvxl.
4 years ago
Roger Light 5cae4d1d81 Fix broker sending duplicate CONNACK on failed MQTT v5 reauthentication.
Closes #2339. Thanks to hvxl.
4 years ago
Roger Light 51eda2bf79 Add more efficient keepalive check. 4 years ago
Roger A. Light 3b471c8669 Fix test 4 years ago
Roger A. Light a1a190b482 Pointless whitespace tidy. 4 years ago
Roger A. Light c28110d079 Fix test 4 years ago
Roger A. Light 56e5c52abe Fix test. 4 years ago
Roger A. Light e01542b6cf Fix test. 4 years ago
Roger A. Light 0f2f77c945 Improve idle / mux timeout performance. 4 years ago
Roger Light 07f793a108 Fix protocol checks - bridge and CONNACK responses. 4 years ago
Roger A. Light f7a57add81 Add NanoMQ crash test case. 4 years ago
Roger A. Light 7b58eee414 Fix problem parsing config files with Windows line endings.
Closes #2297. Thanks to all the people who commented there!
4 years ago
Roger A. Light 330bf6efdc Various fixes around inflight quota management.
Closes #2306. Thanks to canique.
4 years ago
Roger A. Light 7551a29985 Fix LWT messages not being delivered if `per_listener_settings` was set to true
Closes #2314. Thanks to Marc Hamel.
4 years ago
Roger A. Light 4f24ffef2f Add `disable_client_cert_date_checks` option. 4 years ago
Roger A. Light ba936a869d Add `accept_protocol_versions` option. 4 years ago
Roger A. Light f552ec48b1 Add global_max_connections option. 4 years ago
Roger A. Light 02685d49b6 Add `global_max_clients` option.
This allows limiting client sessions globally on the broker.
4 years ago
Roger A. Light 1c6d74f208 Fix test 4 years ago
Roger A. Light aa29b45e70 Merge branch 'master' into develop 4 years ago
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.
4 years ago
Roger A. Light 9d6a73f9f7 Fix CONNECT performance with many user-properties.
An MQTT v5 client connecting with a large number of user-property properties
could cause excessive CPU usage, leading to a loss of performance and
possible denial of service. This has been fixed.
4 years ago