[Bug]: TrafficManagement: unknown_packet_threshold has no effect — undecryptable packets never reach modules (2.8.0–2.8.2, develop)
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 45/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- cpp
- Domain
- embedded-iot, networking
Research direction
Read src/mesh/Router.cpp around passesRoutingAuthGate() and the opaque relay return path, then trace TrafficManagementModule::shouldDropUnknown() in src/modules/TrafficManagementModule.cpp. Start by adding an integration test to test/test_traffic_management/test_main.cpp that sends an opaque packet through the router. Done means packets over the configured threshold are no longer relayed, with the existing module tests still passing.
Written by the indexing model from the issue text.
Description
Category
Other
Hardware
Not Applicable
Is this bug report about any UI (https://meshtastic.org/docs/configuration/device-uis/) component firmware?
- Meshtastic UI aka MUI
- InkHUD
- BaseUI
Firmware Version
2.8.2
Description
Summary
The Traffic Management unknown-packet filter (unknown_packet_threshold / shouldDropUnknown()) can never trigger in released 2.8.x firmware. Undecryptable packets are diverted to opaque relay before module dispatch,
so TrafficManagementModule never sees them.
Details (develop @ 647831b25)
- All inbound traffic (radio
src/mesh/RadioInterface.cpp:1560, MQTT downlinksrc/mqtt/MQTT.cpp:199/201, UDPsrc/mesh/udp/UdpMulticastHandler.h:113) goesenqueueReceivedMessage()→Router::runOnce()→
Router::perhapsHandleReceived()(src/mesh/Router.cpp:1708). - There,
passesRoutingAuthGate()(Router.cpp:1769) returnsOPAQUE_RELAY_ONLYforDECODE_OPAQUE(unknown channel,:849) and forDECODE_FAILUREwhen not to/from us (:841). - On
OPAQUE_RELAY_ONLYthe caller doesrelayOpaquePacket(p)+perhapsUplinkOpaquePki(p), releases the packet and returns (Router.cpp:1774-1785).MeshModule::callModules()is only reached later, inside
Router::handleReceived()(Router.cpp:1643). NextHopRouter::relayOpaquePacket()documents this: "Opaque traffic never reaches PacketHistory, NodeDB, modules, phone, or ACK handling" (src/mesh/NextHopRouter.cpp:31).- The routing-auth cache only stores ACCEPTed packets (
Router.cpp:824,:850), so it is not an alternative path. TrafficManagementModulesetsencryptedOk = true(src/modules/TrafficManagementModule.cpp:133) and handleswhich_payload_variant != decodedat:1093by callingshouldDropUnknown()(:1095). That branch is
unreachable, and nothing else calls the unknown-packet check.unknown_packet_dropsstays at 0 regardless of configuration.- The TMM unit tests (
test/test_traffic_management/test_main.cpp, e.g.test_tm_unknownPackets_dropOnNPlusOne) callmodule.handleReceived()directly, bypassing the router, so they still pass. An integration test
feeding an opaque packet throughRouter::perhapsHandleReceived()would catch this.
Likely cause
#10967 (d6b12ea3f, merged 2026-07-21) moved undecryptable packets onto relayOpaquePacket(). TMM (#9358) predates it, and its unknown-packet handling relied on encrypted packets reaching modules. In discussion #9437 a
user reported TMM working on 2.7.20 alpha, before #10967. The same code is present in v2.8.0.47db0e3, v2.8.1.8e6a88d, v2.8.2.d5f1619 and develop @ 647831b25.
Expected behavior
With unknown_packet_threshold > 0, a source exceeding the threshold of undecryptable packets within the 5-minute window should stop being relayed.
Why it matters
Since #11844, CORE_PORTNUMS_ONLY (the ROUTER default) relays all opaque traffic, because the port list cannot apply to it. The unknown-packet filter is the natural complement for routers in that mode to throttle a
source flooding undecryptable traffic, without resorting to LOCAL_ONLY/KNOWN_ONLY, which drop all foreign-channel traffic.
- Dominant language
- C++
- Stars
- 8.4k
- Forks
- 2.8k
- Avg merge
- 3d 14h
- Merged PRs (30d)
- 119
Getting set up
Starts the project's dev container in your browser, under your own GitHub account.
- Ships a Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from meshtastic/firmware
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
meshtastic/firmware#12519 ·
Maintainers usually reply within 1 day
-
first-contribution
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
meshtastic/firmware#12433 · 1 comment ·
Maintainers usually reply within 1 day
-
[Bug]: device-installer.sh closes terminal after completion so results cannot be seenPossibly taken @piyush295 claimed this 27 days ago. Openbug first-contribution triage
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
meshtastic/firmware#11954 · 2 comments ·
Maintainers usually reply within 1 day
-
[Bug]: Heltec Capsule Sensor v3 GPS not workingMay be free again A pull request for this issue was closed without being merged. Openbug first-contribution triaged
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
meshtastic/firmware#9854 · 4 comments · 1 reaction ·
Maintainers usually reply within 1 day
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
meshtastic/firmware#12520 ·
Maintainers usually reply within 1 day
All issues in meshtastic/firmware
Similar issues
-
arch-based bug niri
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
noctalia-dev/noctalia#5552 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 1/5 1-3 hours Newbie friendliness 82/100
EchoTools/nevr-runtime#2912 ·
Maintainers usually reply within 1 day
-
area/docdb kind/failing-test priority/medium status/awaiting-triage
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
yugabyte/yugabyte-db#39462 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 79/100
Maintainers usually reply within 1 day
-
category:port-update
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 2 days