No limit on how late a queued FLOOD packet can be sent, so a delayed packet can re-flood the mesh
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 45/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- c
- 领域
- networking
调研方向
Start with Dispatcher::checkSend(), PacketQueue::get(), and Mesh::routeRecvPacket() to trace how queued FLOOD packets are prioritized and sent. Then inspect PacketManager and StaticPoolPacketManager for the removal path, and the native gtests described in the issue for coverage. Done means overdue FLOOD packets are dropped at the configured limit, DIRECT packets remain unaffected, and the starvation scenario is covered.
由索引模型根据 Issue 内容生成。
描述
Related to #2133 (auto-closed as stale), where several meshes reported old public-channel messages reappearing with the same packet hash and original timestamp.
Behaviour
Two behaviours combine:
- The duplicate table only remembers recent packets.
SimpleMeshTablesholds the last 160 packet hashes (MAX_PACKET_HASHES), with no time component. On a busy mesh it can refill within minutes. - The outbound queue has no age limit.
PacketQueue::get()always sends the highest-priority due packet first. Flood re-sends use priority = hop count (Mesh::routeRecvPacket), and direct/routed traffic is priority 0. Under sustained higher-priority traffic, plus airtime-budget and CAD waits, a long-path flood can be held well past its scheduled time. Nothing caps how late it can go out.
If a delayed flood goes out after neighbours have forgotten its hash, they treat it as new and flood it across the mesh again with a normal-looking path. loop.detect doesn't catch this.
How this relates to #2133
Realistically, this produces delays of seconds to minutes, not hours, because the queue has only 32 slots. So it probably doesn't explain the 2–3 hour reports in #2133 by itself. Those may involve an external replay, e.g. a bridge or IP backhaul that buffers raw packets. Still, nothing in the queue limits how late a flood can be sent, and that seems worth closing off.
Proposed change
Before each send attempt, Dispatcher::checkSend() drops any queued FLOOD packet whose scheduled send time is more than MAX_FLOOD_TX_OVERDUE_MILLIS (default 60 s) in the past.
- Can be set at build time (
-D MAX_FLOOD_TX_OVERDUE_MILLIS=...) or per node by overridinggetMaxFloodTxOverdue().0disables it. - DIRECT packets are not affected.
- New
PacketManager::removeOverdueFlood(), which does nothing by default so otherPacketManagerimplementations still compile.StaticPoolPacketManagerimplements it. - Native gtest coverage for the queue function and for
Dispatcher, using a fake radio and clock, including a starvation scenario.Dispatcher.cppis now part of thenativetest build.
Branch: fix/expire-stale-outbound-floods. I'm happy to adjust the default limit or make it a CLI pref (e.g. set flood.max.delay) if preferred
- 主要语言
- C
- 星标
- 3.9k
- 派生
- 1.5k
- 平均合并
- 18 小时 59 分钟
- 30 天内合并 PR
- 28
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
meshcore-dev/MeshCore 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 63/100
meshcore-dev/MeshCore#3622 ·
维护者通常 1 天内回复
-
[Feature Request] Set Australia (Mid) Preset to automatically enable 2 byte default path hash size未关闭
难度 2/5 1-3 小时 新手友好度 62/100
meshcore-dev/MeshCore#3571 · 5 个 reaction ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 74/100
meshcore-dev/MeshCore#3567 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
meshcore-dev/MeshCore#3549 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 77/100
meshcore-dev/MeshCore#3513 ·
维护者通常 1 天内回复
查看 meshcore-dev/MeshCore 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 84/100
vercel-labs/zerolang#442 ·
-
难度 2/5 1-3 小时 新手友好度 75/100
维护者通常 1 天内回复
-
triage
难度 2/5 1-3 小时 新手友好度 67/100
维护者通常 1 天内回复
-
mewencode: base256[] and base128[] are indexed out of bounds by a non-ASCII octet可能已有人在做 @kazu-yamamoto 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 78/100
kazu-yamamoto/Mew#276 ·
维护者通常 1 天内回复
-
[iwm] transaction_get() copies the whole payload regardless of the length asked for可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 1/5 1 小时以内 新手友好度 91/100
FujiNetWIFI/fujinet-firmware#2045 ·
维护者通常 1 天内回复