cli: a saved config defines its VLANs and access lists before the ports that name them (#1766) #1767

Merged
jaylouisw merged 1 commit from fix/1117-0135 into main 2026-11-17 01:57:51 +00:00
Owner

show running-config printed the interface blocks first and the VLAN and access-list tables after
them. A port line is allowed to name those objects (switchport access vlan 10, ip access-group 101 in)
and both parsers refuse a name that does not exist yet, so the printed config did not replay:

% Access VLAN does not exist.
% Access list 101 does not exist

The ACL binding was dropped outright, so a restored switch filtered nothing - silently.

The two tables are plain config-mode lines with no sub-mode, so they now go before the interface blocks.

Test: six assertions in test/config-roundtrip.test.js; five of them fail on the previous printer
(the ACL binding survives the restore, in and out reports {"Gi1/0/9":{"in":101}} vs {}).

Gates: node scripts/syntax-check.js -> 369 files, all OK; npm test -> 298 suites, 10521 assertions,
0 failed.

Fixes #1766

`show running-config` printed the interface blocks first and the VLAN and access-list tables after them. A port line is allowed to name those objects (`switchport access vlan 10`, `ip access-group 101 in`) and both parsers refuse a name that does not exist yet, so the printed config did not replay: ``` % Access VLAN does not exist. % Access list 101 does not exist ``` The ACL binding was dropped outright, so a restored switch filtered nothing - silently. The two tables are plain config-mode lines with no sub-mode, so they now go before the interface blocks. Test: six assertions in `test/config-roundtrip.test.js`; five of them fail on the previous printer (`the ACL binding survives the restore, in and out` reports `{"Gi1/0/9":{"in":101}} vs {}`). Gates: `node scripts/syntax-check.js` -> 369 files, all OK; `npm test` -> 298 suites, 10521 assertions, 0 failed. Fixes #1766
cli: a saved config defines its VLANs and access lists before the ports that name them (#1766)
All checks were successful
CI / Classify the change (pull_request) Successful in 8s
PR rebase / Rebase onto main and arm auto-merge (pull_request) Successful in 16s
CI / Server smoke test (pull_request) Successful in 10s
CI / Docker build (pull_request) Successful in 23s
CI / Test (Node 20) (pull_request) Successful in 51s
CI / Test (Node 18) (pull_request) Successful in 57s
CI / Test (Node 22) (pull_request) Successful in 53s
CI / Arm auto-merge (pull_request) Successful in 4s
128824a249
The running-config printer wrote the interface blocks first and the VLAN and ACL
tables afterwards. An interface line is allowed to reference those objects
('switchport access vlan 10', 'ip access-group 101 in') and both parsers refuse a
reference that does not exist yet, so the printed config did not replay: the ACL
binding was rejected and the restored port filtered nothing, silently.

Six assertions in test/config-roundtrip.test.js; five fail on the previous printer.
jaylouisw force-pushed fix/1117-0135 from 128824a249
All checks were successful
CI / Classify the change (pull_request) Successful in 8s
PR rebase / Rebase onto main and arm auto-merge (pull_request) Successful in 16s
CI / Server smoke test (pull_request) Successful in 10s
CI / Docker build (pull_request) Successful in 23s
CI / Test (Node 20) (pull_request) Successful in 51s
CI / Test (Node 18) (pull_request) Successful in 57s
CI / Test (Node 22) (pull_request) Successful in 53s
CI / Arm auto-merge (pull_request) Successful in 4s
to 5c39dcc351
Some checks failed
CI / Classify the change (pull_request) Successful in 8s
PR rebase / Rebase onto main and arm auto-merge (pull_request) Successful in 16s
CI / Server smoke test (pull_request) Successful in 28s
CI / Test (Node 18) (pull_request) Failing after 1m1s
CI / Test (Node 20) (pull_request) Failing after 1m0s
CI / Test (Node 22) (pull_request) Successful in 1m12s
CI / Docker build (pull_request) Successful in 29s
CI / Arm auto-merge (pull_request) Successful in 3s
2026-11-17 01:56:48 +00:00
Compare
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!1767
No description provided.