`packet->path_len = 0` vynuluje celý bajt — a v jeho horních dvou bitech bydlí
šířka hashe (`Packet.h:85`). Zerohop paket proto hlásil 1 B bez ohledu na
`path_hash_mode`, zatímco floodová větev šířku dostávala. Na uzlu s 2bajtovým
nastavením to vypadalo takhle: `flood: {2 B}` a `route2: {1 B}` od téhož
původce, přesně `advert.interval` od sebe.
Routing to nerozbíjí (zerohop nemá cestu a nepřeposílá se, `Mesh.cpp:83` chce
`getPathHashCount() > 0`), ale kazí to odvozování šířky v analyzerech — a je to
pravděpodobné vysvětlení části komunitních uzlů vedených jako "suspected 1B".
`sendZeroHop()` dostal `path_hash_size=1` jako `sendFlood()` a všechna čtyři
volání v `simple_repeater` mu předávají `_prefs.path_hash_mode + 1`. Zvlášť to
u periodického advertu (`MyMesh.cpp:1706`), který NEJDE přes
`sendSelfAdvertisement()` — oprava jen v té funkci by ho minula, a přitom je to
zrovna on, koho bylo v datech vidět.
Ostatní příklady se nemění, default zachovává dnešní chování. Build ověřen na
všech třech produkčních envech.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Upstream shipped companion/repeater/room-server v1.17.0 today; its tree is
identical to origin/main, so that is what this merges. Our base was 7 Jul
(7b566670), i.e. 350 files / +11k lines of upstream behind.
Conflicts and how they were settled:
* Mesh.cpp -- upstream split the dedup into wasSeen() + explicit markSeen().
Kept BOTH: their new call pair AND our payload-length bound on the TRACE
path-hash read, which is what stops a crafted short TRACE from steering
isHashMatch() past the buffer.
* companion_radio/main.cpp -- upstream grew its own MultiSerialInterface
(BLE + USB + WiFi + Ethernet registered side by side), which is a superset
of the SerialDualInterface we backported from PR #1779. Took theirs whole;
our copy is now dead code. NOTE: envs that relied on the backport for a USB
console alongside BLE now need an explicit -D ENABLE_USB_INTERFACE.
* ui-new/UITask.cpp -- isSerialEnabled() was renamed isBluetoothEnabled()
upstream and DisplayDriver::RED became UIColor::warning_txt. Same intent
either way: no BT pin on screen while Bluetooth is off.
* EnvironmentSensorManager.cpp -- upstream fixed the millis() wrap on the GPS
update timer in the exact line our gpsDutyLoop() call sits on. Kept both,
with their wrap-safe compare.
* NRF52Board.cpp -- upstream independently arrived at the same sd_temp_get()
fix for SoftDevice-protected TEMP. Took their form, kept our comment, which
is the only place recording WHY (APP_MEMACC fault -> reboot on telemetry).
* RadioLibWrappers.{h,cpp}, simple_repeater/main.cpp -- add/add. Their
configSideDetectors()/performChannelScan()/external watchdog next to our
irqDoneMask()/probeDio1()/BLE pump/WDT feed. The repeater console keeps the
1032-byte reply buffer for paged analyzer output and now clears it, since a
static buffer would otherwise reprint the previous reply.
* .vscode/extensions.json -- deleted upstream, and it is in .gitignore; our
only change was a comment. Gone.
Built clean: Xiao_x1_rpt, Xiao_x2_cmp, Xiao_x3_obs, SenseCap_s1_rpt,
T1000E_cmp_cz. Not flashed to anything yet.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
onRecvPacket() used two received length fields without validating them against the actual received/decrypted length (TRACE payload_len underflow + OOB read; PATH path_len OOB stack read + extra_len underflow). Both now validated before use.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* repeater: onControlDataRecv(), now responds to new CTL_TYPE_NODE_DISCOVER_REQ (zero hop only)
* node prefs: new discovery_mod_timestamp (will be set to affect when node should respond to DISCOVERY_REQ's )