devices(ubiquiti): the Dream Machine's LAN bank carries a LAN role, so its uplink stops answering the LAN address (#130 fallback) #2362

Merged
jaylouisw merged 1 commit from catalogue/1121-0352 into main 2026-11-21 04:07:55 +00:00
Owner

Refs #130 (Dream Wall Pro). Fallback work on the row next to it: the UniFi Dream Machine is the last Dream-family gateway whose LAN bank carried no role.

The defect, measured at this tree. engine/device.js ownsIpOn separates the two L3 surfaces only when both sides carry a role (owner.role && inIface.role && owner.role !== inIface.role). devices/ubiquiti/udm.json had no role anywhere, so with 192.168.1.1/24 on LAN 1:

  • ownsIpOn(WAN, '192.168.1.1') returned the LAN 1 interface (truthy) before the change; null after.
  • a host cabled to the WAN socket inside 192.168.1.0/24 got an ICMP reply from the LAN gateway before the change; no reply after (added to test/ubiquiti-wan-lan-role-separation.test.js).

Evidence, both vendor surfaces, read 2026-11-21:

surface bytes what it prints
https://static.ui.com/fingerprint/ui/public.json (sku = UDM) 832,585 unifi.network.ports = {"eth0":"LAN","eth1":"LAN","eth2":"LAN","eth3":"LAN","eth4":"WAN"}; deviceCapabilities includes SWITCH; panel 01 02 03 04 __ 05
https://dl.ui.com/ds/udm_ds.pdf 747,030 Networking interface (4) LAN: GbE RJ45 ports / (1) WAN: GbE RJ45 port
https://techspecs.ui.com/unifi/cloud-gateways/udm 608,032 model name only, no spec table (unknown-slug control 307s to the 609,911 B front page) - not used for the split

No socket was guessed: the spec already names WAN and LAN 1-LAN 4, and both vendor surfaces agree which one is the uplink. WAN gets role: "wan", the four LAN sockets role: "lan".

Gates: scripts/syntax-check.js 513 files OK; scripts/audit-port-types.js 0 gated contradictions; scripts/audit-devices.js 0 hard defects; test/hardware-invariants.test.js 26 passed; test/port-roles.test.js 19 passed; scripts/run-tests.js 433 suites / 14,551 assertions, 0 failed. docs/DEVICE_REGISTRY.md unchanged by regen-registry-doc.js.

Deliberately not touched: the two SFP+ cages (absent on this SKU anyway), the other Dream rows (done in #2359), and #130 itself - the Pro still has no vendor page, so this PR does not close it.

Refs #130 (Dream Wall Pro). Fallback work on the row next to it: the UniFi Dream Machine is the last Dream-family gateway whose LAN bank carried no role. **The defect, measured at this tree.** `engine/device.js` `ownsIpOn` separates the two L3 surfaces only when both sides carry a role (`owner.role && inIface.role && owner.role !== inIface.role`). `devices/ubiquiti/udm.json` had no `role` anywhere, so with `192.168.1.1/24` on `LAN 1`: - `ownsIpOn(WAN, '192.168.1.1')` returned the LAN 1 interface (truthy) before the change; `null` after. - a host cabled to the WAN socket inside `192.168.1.0/24` got an ICMP reply from the LAN gateway before the change; no reply after (added to `test/ubiquiti-wan-lan-role-separation.test.js`). **Evidence, both vendor surfaces, read 2026-11-21:** | surface | bytes | what it prints | |---|---|---| | `https://static.ui.com/fingerprint/ui/public.json` (`sku` = UDM) | 832,585 | `unifi.network.ports` = `{"eth0":"LAN","eth1":"LAN","eth2":"LAN","eth3":"LAN","eth4":"WAN"}`; `deviceCapabilities` includes `SWITCH`; panel `01 02 03 04 __ 05` | | `https://dl.ui.com/ds/udm_ds.pdf` | 747,030 | `Networking interface (4) LAN: GbE RJ45 ports / (1) WAN: GbE RJ45 port` | | `https://techspecs.ui.com/unifi/cloud-gateways/udm` | 608,032 | model name only, no spec table (unknown-slug control 307s to the 609,911 B front page) - not used for the split | No socket was guessed: the spec already names `WAN` and `LAN 1`-`LAN 4`, and both vendor surfaces agree which one is the uplink. `WAN` gets `role: "wan"`, the four LAN sockets `role: "lan"`. **Gates:** `scripts/syntax-check.js` 513 files OK; `scripts/audit-port-types.js` 0 gated contradictions; `scripts/audit-devices.js` 0 hard defects; `test/hardware-invariants.test.js` 26 passed; `test/port-roles.test.js` 19 passed; `scripts/run-tests.js` 433 suites / 14,551 assertions, 0 failed. `docs/DEVICE_REGISTRY.md` unchanged by `regen-registry-doc.js`. **Deliberately not touched:** the two SFP+ cages (absent on this SKU anyway), the other Dream rows (done in #2359), and #130 itself - the Pro still has no vendor page, so this PR does not close it.
devices(ubiquiti): the Dream Machine's LAN bank carries a LAN role, so its uplink stops answering the LAN address (#130 fallback)
All checks were successful
CI / Classify the change (pull_request) Successful in 25s
PR rebase / Rebase onto main and arm auto-merge (pull_request) Successful in 22s
CI / Test (Node 22) (pull_request) Successful in 1m10s
CI / Test (Node 18) (pull_request) Successful in 1m14s
CI / Test (Node 20) (pull_request) Successful in 1m14s
CI / Server smoke and Docker build (pull_request) Successful in 24s
CI / Arm auto-merge (pull_request) Successful in 4s
77ef1fba2f
forgejo-actions scheduled this pull request to auto merge when all checks succeed 2026-11-21 04:00:03 +00:00
jaylouisw deleted branch catalogue/1121-0352 2026-11-21 04:07:58 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
jaylouisw/packetforge!2362
No description provided.