description ? and ip nat pool ? still store the help key: a port described "?" and a NAT pool called "?" #1691
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
jaylouisw/packetforge#1691
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?
The measurement
?is the key an operator presses to ask what goes here. #1685 refused it in the three free-textpositions the sweep found —
hostname,dns zone,vlan <id> name. Two more store it as the text.Interface description. The console's own interface-mode help advertises
description <text>, andthe position takes the key:
The receipt reads exactly like the one
description labgives, and whatever description the port hadis gone.
NAT pool name.
A pool nobody asked for, which
ip nat inside source list <spec> pool ? overloadwill then accept,and whose only clean exit is quoting the key back at
no ip nat pool ?.Why the typed positions were safe and these are not
Every typed position refuses the key by quoting it (
% Invalid VLAN id "?",% Invalid AS number "?"):a value that will not parse is a value that can be corrected. A description and a pool name are free
text, so any string is legal — including the one string that means "I was asking a question". #1685's
fix is a helper (
_helpKeyRefusal) applied at three positions; these two are the same defect atpositions that sweep missed, and the sweep has now been done over every config head that takes a text
value:
description,ip nat pool,access-list <n>,dns zone/dns add,vlan <id> name,hostname. The rest either validate their argument or already refuse the key.The fix that follows
description ?andip nat pool ?are refused by name, before anything is written, quoting the syntaxand saying nothing changed — the same message shape as #1685. A question mark inside a longer value
(
description edge?1, pool namepool?1) stays part of the value, because only the whole value is thekey. Test additions belong in
test/help-key-is-not-a-value.test.js, which already pins the #1685 set.Found while sweeping this, filed separately, not fixed here
The
noforms read the tokens they need and ignore the rest, so a?at the end of anoline doesnot ask — it acts:
A keypress deletes a VLAN there. Different mechanism, different fix, so it gets its own issue.
?at the end of anoline is not a question:no vlan 42 name ?deletes VLAN 42 andno hostname ?clears the name #1694