? in a free-text position is stored as the name: hostname ? renames the box to "?" #1685
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
jaylouisw/packetforge#1685
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 a technician presses when they do not know what goes in a position. Three commands take free text,and all three stored the key as the text. Each was run on a fresh device, config mode, and the running-config was
diffed before and after:
hostname ?hostname ?- the box was renamed to?dns zone ?DNS zone ? readydns zone ?- a zone named?was createdvlan 42 name ?VLAN 42 created (name: ?)vlan 42 ?- VLAN 42 created and named?Why this is a bug and not a design choice
Every typed position already refuses the key by quoting it, because a value that will not parse can be
corrected:
% Invalid VLAN id "?": a VLAN id is a whole number from 1 to 4094,% Invalid router-id "?": not an IPv4 address,% Invalid pool name: ?,% "?" is not a bridge priority. The free-text positions could not refuseit that way, because any string is a legal name - so the key became one, silently.
The silent one is the worst:
hostnameprints its receipt as a prompt, sohostname ?looks exactly like asuccessful rename until you look at a surface that shows the name. That is the same defect #1497 fixed for a bare
hostname(it cleared the name to null and said nothing), one keypress further along.What is not wrong, and must stay
hostnameis still% Incomplete command: hostname <name> (the name is unchanged)- a short line, not akeypress;
hostname edge?1stores and printsedge?1.Only the whole value is the key.
Found while sweeping the
.?positions of every view onmain@6e3b5d6a; no open issue covered it.hostname ?,dns zone ?andvlan <id> name ?refuse it (#1685) #1686Fixed on
fix/1116-1606@6141938a, PR #1686 (mergeable, open).One helper,
_helpKeyRefusal(), at the three free-text sites:hostname,dns zoneandvlan <id> name. Each refuses before anything is created, so a keypress leaves no VLAN, no zone and no name behind.Pinned as unchanged: a bare
hostnameis still% Incomplete command(#1497), andhostname edge?1still storesedge?1- only the whole value is the key.description ?andip nat pool ?still store the help key: a port described "?" and a NAT pool called "?" #1691?at the end of anoline is not a question:no vlan 42 name ?deletes VLAN 42 andno hostname ?clears the name #1694