This archive is retained to ensure existing URLs remain functional. It will not contain any emails sent to this mailing list after July 1, 2024. For all messages, including those sent before and after this date, please visit the new location of the archive at https://mailman.ripe.net/archives/list/ripe-atlas@ripe.net/
[atlas] IPv4 leading zeroes and weird interface behaviour
- Previous message (by thread): [atlas] IPv4 leading zeroes and weird interface behaviour
- Next message (by thread): [atlas] IPv4 leading zeroes and weird interface behaviour
Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Peter J. Holzer
hjp at hjp.at
Wed Oct 25 23:16:47 CEST 2017
On 2017-10-25 13:54:46 -0700, Phillip Remaker wrote: > Historically, C uses a 0 to precede an octal number, 0x to precede a decimal, > and 0b for binary. 0b for binary is not C. It is used by some other languages, though (e.g. Perl). > Since 0x is not accepted, That depends on the tool: % ping 0x8f.0x82.0x10.0x8 PING 0x8f.0x82.0x10.0x8 (143.130.16.8) 56(84) bytes of data. 64 bytes from 143.130.16.8: icmp_seq=1 ttl=55 time=8.37 ms 64 bytes from 143.130.16.8: icmp_seq=2 ttl=55 time=8.26 ms ... % ping -V ping utility, iputils-s20161105 > There's probably some downstream library making the anachronistic assumption. Possibly gethostbyname in the libc, but I haven't tested that. At least interpreting numbers with leading zeroes as octal is traditional on unix-like OSs (I probably first noticed that on Ultrix around 1990). I don't know why anyone thought this was a good idea. I wouldn't expect anyone to rely on it, but apparently nobody dares to get rid of that "feature". hp -- _ | Peter J. Holzer | we build much bigger, better disasters now |_|_) | | because we have much more sophisticated | | | hjp at hjp.at | management tools. __/ | http://www.hjp.at/ | -- Ross Anderson <https://www.edge.org/> -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: not available URL: </ripe/mail/archives/ripe-atlas/attachments/20171025/d7fe0256/attachment.sig>
- Previous message (by thread): [atlas] IPv4 leading zeroes and weird interface behaviour
- Next message (by thread): [atlas] IPv4 leading zeroes and weird interface behaviour
Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]