Browse Source
Merge pull request #1299 from entr0p1/companion-timestamp-fix
BUGFIX: Companion packet timestamp mismatch trips replay protection
pull/1303/head
ripplebiz
5 months ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
2 additions and
1 deletions
-
examples/companion_radio/MyMesh.cpp
|
|
|
@ -903,6 +903,7 @@ void MyMesh::handleCmdFrame(size_t len) { |
|
|
|
int result; |
|
|
|
uint32_t expected_ack; |
|
|
|
if (txt_type == TXT_TYPE_CLI_DATA) { |
|
|
|
msg_timestamp = getRTCClock()->getCurrentTimeUnique(); // Use node's RTC instead of app timestamp to avoid tripping replay protection
|
|
|
|
result = sendCommandData(*recipient, msg_timestamp, attempt, text, est_timeout); |
|
|
|
expected_ack = 0; // no Ack expected
|
|
|
|
} else { |
|
|
|
@ -1880,4 +1881,4 @@ bool MyMesh::advert() { |
|
|
|
} else { |
|
|
|
return false; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|