mirror of
https://github.com/meshcore-dev/MeshCore.git
synced 2026-04-20 22:13:47 +00:00
* workaround for TRACE packets so they can follow a return path
This commit is contained in:
parent
807b9bdc19
commit
691c135c22
1 changed files with 3 additions and 0 deletions
|
|
@ -14,6 +14,9 @@ void Packet::calculatePacketHash(uint8_t* hash) const {
|
|||
SHA256 sha;
|
||||
uint8_t t = getPayloadType();
|
||||
sha.update(&t, 1);
|
||||
if (t == PAYLOAD_TYPE_TRACE) {
|
||||
sha.update(&path_len, sizeof(path_len)); // CAVEAT: TRACE packets can revisit same node on return path
|
||||
}
|
||||
sha.update(payload, payload_len);
|
||||
sha.finalize(hash, MAX_HASH_SIZE);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue