acl: show access-lists spells a standard entry the way a box does #2071

Merged
jaylouisw merged 1 commit from rev/1119-0212 into main 2026-11-19 02:40:22 +00:00
Owner

Question

On a standard IPv4 list, how does a box print the source on a show access-lists line — the address and wildcard as typed, or addr, wildcard bits wc? And is the extended form the same?

Verdict

Settled and corrected for the standard form. A box prints <addr>, wildcard bits <wc>, a host as the bare address (no host keyword), and any as any. The console echoed the typed line (permit 192.168.1.0 0.0.0.255, deny host 10.0.1.10).

Sources: Cisco doc 23602; Catalyst 2960 12.2(44)SE command reference; Catalyst 2960-L 15.2(5)E and Catalyst 9300 17.16 config guides; ntc-templates real captures (show_access-list.raw, show_ip_access-lists.raw, show_access-list3.raw). The extended form keeps host and has no comma, and since typed extended lines already match it, they are untouched.

Change

  • engine/acl.js: displayBody(entry) renders a standard entry's body from the parsed source, returning null for lines it does not speak for.
  • engine/cli.js: asks it for standard entries; everything else keeps the typed text. Sequences, indent, counter key and show running-config unchanged.
  • test/show-access-lists-standard-address-form.test.js (17 checks); test/acl-data.test.js updated from the old typed form to the vendor's.
  • research/show-access-lists-standard-address-form.md records sources and what is still open (permit/deny padding, numeric all-ones wildcard vs any, extended host normalisation).

Tests

node scripts/syntax-check.js: 435 files OK. npm test: 358 suites, 12318 assertions, 0 failed.

Unresolved: the permit/deny padding on standard lines (captures disagree), whether 0.0.0.0 255.255.255.255 folds into any, and whether a box normalises an extended <addr> 0.0.0.0 to host <addr>.

## Question On a standard IPv4 list, how does a box print the source on a `show access-lists` line — the address and wildcard as typed, or `addr, wildcard bits wc`? And is the extended form the same? ## Verdict Settled and corrected for the standard form. A box prints `<addr>, wildcard bits <wc>`, a host as the bare address (no `host` keyword), and `any` as `any`. The console echoed the typed line (`permit 192.168.1.0 0.0.0.255`, `deny host 10.0.1.10`). Sources: Cisco doc 23602; Catalyst 2960 12.2(44)SE command reference; Catalyst 2960-L 15.2(5)E and Catalyst 9300 17.16 config guides; ntc-templates real captures (`show_access-list.raw`, `show_ip_access-lists.raw`, `show_access-list3.raw`). The extended form keeps `host` and has no comma, and since typed extended lines already match it, they are untouched. ## Change - `engine/acl.js`: `displayBody(entry)` renders a standard entry's body from the parsed source, returning `null` for lines it does not speak for. - `engine/cli.js`: asks it for standard entries; everything else keeps the typed text. Sequences, indent, counter key and `show running-config` unchanged. - `test/show-access-lists-standard-address-form.test.js` (17 checks); `test/acl-data.test.js` updated from the old typed form to the vendor's. - `research/show-access-lists-standard-address-form.md` records sources and what is still open (permit/deny padding, numeric all-ones wildcard vs `any`, extended host normalisation). ## Tests `node scripts/syntax-check.js`: 435 files OK. `npm test`: 358 suites, 12318 assertions, 0 failed. Unresolved: the `permit`/`deny` padding on standard lines (captures disagree), whether `0.0.0.0 255.255.255.255` folds into `any`, and whether a box normalises an extended `<addr> 0.0.0.0` to `host <addr>`.
acl: show access-lists spells a standard entry the way a box does
All checks were successful
PR rebase / Rebase onto main and arm auto-merge (pull_request) Successful in 5s
CI / Classify the change (pull_request) Successful in 6s
CI / Server smoke test (pull_request) Successful in 14s
CI / Docker build (pull_request) Successful in 23s
CI / Test (Node 20) (pull_request) Successful in 55s
CI / Test (Node 22) (pull_request) Successful in 55s
CI / Test (Node 18) (pull_request) Successful in 1m1s
CI / Arm auto-merge (pull_request) Successful in 2s
d7a605c495
forgejo-actions scheduled this pull request to auto merge when all checks succeed 2026-11-19 02:30:31 +00:00
Sign in to join this conversation.
No description provided.