Fixes #9792 : Hop with Meshtastic ffff and ?dB is added to missing hop in traceroute#9945
Conversation
There was a problem hiding this comment.
Pull request overview
Fixes traceroute duplicate-packet handling by ensuring packets are decoded before checking traceroute portnum in FloodingRouter::reprocessPacket, preventing a duplicate from replacing a to-be-rebroadcasted packet without the processing node hop/SNR info.
Changes:
- Attempt to decode non-decoded packets in
reprocessPacket()when traceroute support is enabled. - Bail out on decode failure to avoid acting on packets that can’t be inspected for traceroute.
- Add debug printing for successfully decoded duplicate packets.
You can also share your feedback on Copilot code review. Take the survey.
GUVWAF
left a comment
There was a problem hiding this comment.
Looks good to me! Thanks for the effort.
Log improvement for failure to decode packet. Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
4cb75c2 to
1cbf96f
Compare
|
@fifieldt needs a tag, plz! |
|
Sorry @NomDeTom , pre-coffee brain failed to understand - was this one good to merge? Is there a particular label we need to apply? |
Not necessarily for merging, but if it has no labels then the first check on the CI will always fail. Iirc, it will apply labels the first time only, but if all the labels are removed then it won't reapply them. |
…missing hop in traceroute (meshtastic#9945) * Fix issue 9792, decode packet for TR test * Fix 9792: Assure packet id decoded for TR test * Potential fix for pull request finding Log improvement for failure to decode packet. Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * trunk fmt --------- Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Co-authored-by: Tom Fifield <tom@tomfifield.net>
…p in traceroute (#9945) * Fix issue 9792, decode packet for TR test * Fix 9792: Assure packet id decoded for TR test * Potential fix for pull request finding Log improvement for failure to decode packet. Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * trunk fmt --------- Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Co-authored-by: Tom Fifield <tom@tomfifield.net>
…missing hop in traceroute (meshtastic#9945) * Fix issue 9792, decode packet for TR test * Fix 9792: Assure packet id decoded for TR test * Potential fix for pull request finding Log improvement for failure to decode packet. Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * trunk fmt --------- Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Co-authored-by: Tom Fifield <tom@tomfifield.net>
This fixes the situation where a duplicate packet from a traceroute will replace the packet to be rebroadcasted with the original packet (not containing the processing node).
fixes #9792
The change is to check in FloodingRouter::reprocessPacket if the packet is already decoded. This is necessary to check portnum for TraceRoute messages. If decode fails we bailout (can't test it).
If decode succeeds we let the original code run. I kept the original test for decoded, just in case this fix is changed in the future and we risk reaching to that test without decoding (it could crash if we test an uninitialized field - portnum -)
Tests were run, forcing the flow to use the change. Output in tracepath was correct. Node run for about 10H without noticeable issues caused by this change.
Log showing the new situation:
🤝 Attestations
Heltec WSL V3