cli: a saved config defines its VLANs and access lists before the ports that name them (#1766) #1767
No reviewers
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
jaylouisw/packetforge!1767
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/1117-0135"
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?
show running-configprinted the interface blocks first and the VLAN and access-list tables afterthem. 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:
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 outreports{"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
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.128824a2495c39dcc351