-
Notifications
You must be signed in to change notification settings - Fork 125
Open
Description
IPv4 and IPv6 addresses can be expressed in different notations. I noticed that ipcalc in version 0.51 does not support many of them.
Example addresses that fail with ipcalc 0.51 ("INVALID ADDRESS: ..."), but work with ping (from iputils 20210202 on Debian 11 bullseye 5.10.0-25-amd64):
127.1 # skipping zeros
0177.0x1 # using octal (0<number>) and hexadecimal (0x<number>)
127.999 # overflow into next octet
2130706433 # not using octet grouping
See:
- Fun with IP address parsing
- Hacker News discussion: https://news.ycombinator.com/item?id=25545967
- Having fun with unusual IPv4 formats
- https://stackoverflow.com/questions/10133820/is-there-any-documentation-for-omitting-zeroes-in-dot-decimal-notation-of-ipv4-a
- https://superuser.com/questions/614001/why-can-i-ping-127-1
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels