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/[email protected]/
[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 ]
Hugo Salgado-Hernández
hsalgado at nic.cl
Wed Oct 25 23:06:26 CEST 2017
It was warned before on this IETF draft, but it was never published: <https://www.ietf.org/archive/id/draft-main-ipaddr-text-rep-02.txt> Hugo On 13:54 25/10, Phillip Remaker wrote: > Historically, C uses a 0 to precede an octal number, 0x to precede a > decimal, and 0b for binary. Leading zeroes are otherwise stripped in > numerical representation. > > Since 0x is not accepted, I'd call it a bug and request that the numbers > always get treated as decimal, regardless of leading zeros. > > There's probably some downstream library making the anachronistic > assumption. > > On Wed, Oct 25, 2017 at 1:45 PM, Max Grobecker < > max.grobecker at ml.grobecker.info> wrote: > > > Hello, > > > > is there - by standard - a definition on how to represent an IPv4 address? > > > > I have (for example) the IP address "73.0.255.229", which can IMHO also be > > written as "073.000.255.229" as the leading zeroes > > are not giving any changes to the binary representation of this address. > > Am I right on this? > > > > But: When I lookup this IP address on https://stat.ripe.net/073.000. > > 255.229 the first octet is internally getting swapped to "59". > > This can be explained, if you take "073" as an octal value and convert it > > to a decimal value. > > It is definitely a octal-to-decimal conversion thing, as for example also > > the value "010" is getting replaced by "8" and so on. > > > > Now I'm puzzled: Of course, writing IPv4 octets with leading zeroes is not > > very common. > > But: Is it officially prohibited or discouraged? > > > > This weird conversion also happens inside the "geoiplookup" tool by > > MaxMind and I'm not sure if I'm going to be the moron in this story > > or if I found the same bug inside multiple softwares at once ;-) > > > > > > Thanks and greetings from Wuppertal > > Max > > > > -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: </ripe/mail/archives/ripe-atlas/attachments/20171025/638e53b9/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 ]