AbCip controller browse ignores the authored EtherNet/IP port (#534 defect, discovery half) — browses whatever answers on 44818 #539
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Found by the live
/rungate for the raw-modal picker live-config fix(
docs/plans/2026-08-05-raw-modal-picker-live-config.mdTask 5), 2026-08-05.Symptom
An AbCip device authored with a non-default EtherNet/IP port browses the wrong controller.
On the docker-dev rig, a device at
ab://10.100.0.35:44999/1,0(nothing listening on 44999):FAILED · CONNECT FAILED: CONNECTIONREFUSED(correct — the probe honours the port).full nine-tag symbol table of the fixture on 44818.
Re-pointed at
ab://127.0.0.1/1,0the browse fails as expected (ERRORTIMEOUT), so the browse isgenuinely live — it is only the port that is dropped.
Cause
This is Gitea #534's defect, surviving in the AbCip discovery call sites. The data path was
fixed by introducing
AbCipTagCreateParams.LibplctagGateway(host:port), but the twodiscovery-path libplctag tags still pass the bare
Gateway:src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.AbCip/LibplctagTagEnumerator.cs:33—Gateway = deviceParams.Gatewaysrc/Drivers/ZB.MOM.WW.OtOpcUa.Driver.AbCip/LibplctagTemplateReader.cs:24—Gateway = deviceParams.Gatewayvs. the correct
src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.AbCip/LibplctagTagRuntime.cs:24—Gateway = p.LibplctagGateway.libplctag silently substitutes its own 44818 default for a bare host, so the authored port does not
merely fail to apply — the browse redirects to whatever answers on the default port, which on a
plant network is another PLC. That is #534's own wording, and it applies verbatim here: an operator
browsing device B can be shown device A's symbol table and commit tags against it.
The AbLegacy driver has no discovery path, so it is not affected.
Why the existing tests do not catch it
Same reason #534 went unnoticed: the AbCip fixture sits on the default 44818, where the bug is
invisible by construction. A regression test must assert the composed gateway string for a
non-default port at the enumerator/template-reader seam (the
AbCipTagCreateParams→ libplctagTagconstruction), not run against the fixture.Fix
Use
deviceParams.LibplctagGatewayat both sites. Consider making the bareGatewaypropertyharder to reach by accident from a call site that builds a libplctag
Tag.