ip name-server 300.1.1.1 is accepted: net.isIp() is a shape check, at eight doors #1411
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
jaylouisw/packetforge#1411
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?
Found by asking one question of every door that takes an address: what happens if I type one that cannot
exist?
Eight doors took it, because
net.isIp()asked the wrong question — four dotted groups of one to three digits, so300.1.1.1and10.0.0.999were addresses.ipToInt()has always checked the octets, which is whyip address,vrrp 1 ipandpingrefused the same value;pinghad even worked around it with a private strict helper besidethe weak predicate (#1379) rather than fixing the predicate.
Two neighbours of the same mistake turned up in the sweep:
ip route"validated" its mask with a call whose resultit threw away, so
ip route 192.0.2.0 255.0.255.0 10.1.1.9installed192.0.2.0/8; and anaccess-listrefusalprinted
% [object Object].What must be true instead