A stated range in a refusal is not always the range the check applies: channel-group 4097 is accepted #1505
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
jaylouisw/packetforge#1505
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
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?
What happens
channel-group 4097is accepted and creates a bundle, while the refusal for a bad id in the same handler says the range is1-4096:The condition is
!/^\d+$/.test(id) || Number(id) < 1— a lower bound only. #1495 fixed the "a word became configuration" half and left the ceiling unapplied, so an id one digit too far creates a group that the console's own message says cannot exist, and every view that lists bundles prints it.What changes
engine/cli.js: the channel-group id check applies both ends of the range it prints (Number(id) >= 1 && Number(id) <= 4096).docs/CLI.md§ A stated range is the range the check applies.Verification
test/stated-range-is-the-enforced-range.test.js— 10 checks. Every range the console prints is probed at four points (below, low, high, above) and must go refused, accepted, accepted, refused:vlan <id>channel-group <id>vrrp <vrid>vrrp <vrid> priorityspanning-tree priorityipv6 nd ra lifetimeip ospf costping <count>Plus: a refused bundle id leaves no entry in
dev.config.lags, nothing inshow etherchannel summaryand nolagon the port; and both edges (1 and 4096) still work.With the old handler: 8 passed / 2 failed, both naming
4097.Full suite 249 suites / 9147 assertions / 0 failed; syntax 319 files;
skip-audit15/15;help-completeness8/8.Measured and left alone
encapsulation dot1qandip access-groupshowed up in the first sweep as edge refusals and are correct:dot1qon a physical port is refused for being on a physical port, and an access list that does not exist is refused for not existing — both answered in terms of the real problem, not the number.Ready on the server, waiting for a pull request to be creatable.
Branch
fix/stated-rangeat403b512e(pushed as a new ref — new refs still push, updates do not), base1b1e1287, verified: 249 suites / 9147 assertions / 0 failed, syntax 319, new suite 10/10 (old handler 8/2).Creating the PR failed twice with
500 … could not write config file /data/gitea/data/tmp/local-repo/pull.git…/.git/config: No space left on device— a PR needs a temp clone and the volume has no room for one. Two attempts is where I stop; each failure leaves a half-clone.To finish it in one move once there is space:
POST /repos/jaylouisw/packetforge/pullswithhead: fix/stated-range,base: main, then squash-merge on the first attempt that reportsmergeable: true.no channel-group 9999removes the port from the bundle it is really in #1510Filed as #1510 and fixed on the combined branch (
land-all-v4@45b437da) — the range fix here was rightand its neighbours were not:
no channel-group 9999answeredFa0/1 removed from channel group 2. The dispatcher threw the id away, so thedestructive
nonamed nothing and removed something, and the id was never range-checked either;channel-group 10on a port already in group 2 added a second membership, so one cable was listed as a member ofevery bundle it had ever joined — an impossible state, and
show etherchannel summaryreported it;10, 100, 2).All three fixed, with three checks in
no-command-touches-only-what-it-names(11/11; 8 passed / 3 failed againstthe previous handler). Full suite 251 suites / 9213 assertions / 0 failed. The range check this issue is about is
unchanged — it applies to both directions now, which is what the
noform was missing.no channel-groupundoes the group it names, and a port belongs to one bundle (#1510) #1543