feat(mqtt): add opt-in advert signature check before publishing
Received packets are uploaded before Mesh::onRecvPacket validates them, so an advert corrupted over the air that still passes the LoRa CRC is published with a mangled name or location. `set mqtt.advert.verify on` verifies each received advert's Ed25519 signature (same message layout as Mesh.cpp, including the 32-byte app-data clamp) and skips publishing failures. Defaults off so collectors keep seeing RF corruption on the mesh. Dropped adverts are counted as badsig= in `get mqtt.stats`. Exposed in the web config Publishing card and persisted as mqtt.advert_verify in prefs JSON.
This commit is contained in:
1 parent
64276e5d92
commit
4716410bc2
15 files changed
+206
-6
No files matched your search
@@ -964,6 +964,7 @@ void WebConfigServer::handleConfigGet(AsyncWebServerRequest* req) {
|
||||
mqtt["tx"] = _obs->mqtt_tx_enabled == 2 ? "advert"
|
||||
: _obs->mqtt_tx_enabled == 1 ? "on" : "off";
|
||||
mqtt["rx"] = (bool)_obs->mqtt_rx_enabled;
|
||||
mqtt["advert_verify"] = (bool)_obs->mqtt_advert_verify;
|
||||
mqtt["interval"] = _obs->mqtt_status_interval / 60000; // CLI takes minutes
|
||||
mqtt["neighbors"] = (bool)_obs->mqtt_neighbors_enabled;
|
||||
mqtt["neighbors_interval"] = _obs->mqtt_neighbors_interval / 3600000UL; // CLI takes hours
|
||||
|
||||
Reference in new issue
Block a user