radiolib: drop received packets whose LoRa header says no CRC.

This commit is contained in:
R0ck committed 2026-10-30 14:05:25 +00:00
1 parent 351a1ad20c
commit 93254adbca
9 files changed
+39

No files matched your search

@@ -132,6 +132,9 @@ int RadioLibWrapper::recvRaw(uint8_t* bytes, int sz) {
if (len > 0) {
if (len > sz) { len = sz; }
int err = _radio->readData(bytes, len);
if (err == RADIOLIB_ERR_NONE && !lastRxHadCRC()) {
err = RADIOLIB_ERR_LORA_HEADER_DAMAGED; // header says no CRC, so the payload was never checked
}
if (err != RADIOLIB_ERR_NONE) {
MESH_DEBUG_PRINTLN("RadioLibWrapper: error: readData(%d)", err);
len = 0;