Preserve forwarded position payload precision (#10554)
This commit is contained in:
co-authored by
GitHub
parent
5b7a5b2c22
commit
32dcd90abf
+8
-4
@@ -369,10 +369,14 @@ ErrorCode Router::send(meshtastic_MeshPacket *p)
|
|||||||
}
|
}
|
||||||
|
|
||||||
fixPriority(p); // Before encryption, fix the priority if it's unset
|
fixPriority(p); // Before encryption, fix the priority if it's unset
|
||||||
if (!applyPositionPrecisionForChannel(*p, p->channel)) {
|
// Position precision is an originator-only privacy policy. Relays keep
|
||||||
LOG_ERROR("Dropping malformed position packet before send");
|
// p->from as the original sender, so do not rewrite their POSITION_APP payload.
|
||||||
packetPool.release(p);
|
if (isFromUs(p)) {
|
||||||
return meshtastic_Routing_Error_BAD_REQUEST;
|
if (!applyPositionPrecisionForChannel(*p, p->channel)) {
|
||||||
|
LOG_ERROR("Dropping malformed position packet before send");
|
||||||
|
packetPool.release(p);
|
||||||
|
return meshtastic_Routing_Error_BAD_REQUEST;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// If the packet is not yet encrypted, do so now
|
// If the packet is not yet encrypted, do so now
|
||||||
|
|||||||
Reference in New Issue
Block a user