On 26/02/2016 05:38, Leon Mlakar wrote:
Leading zeros in an IP octet indicate octal.
If you ping 192.168.077.1 from both Linux and Windows you get
ping 192.168.077.1 PING 192.168.077.1 (192.168.63.1) 56(84) bytes of data.
Note how it converted 077 to 63. The problem seems to be is that apart from the name, there is nothing
On 25.02.2016 16:40, james wrote: that would guide the interpretation of the leading zeroes in dot-*decimal* notation for IPv4 addresses. For instance, while ping on my Mac agrees with the octal interpretation, nslookup doesn't::
It's most likely just one of those things that nobody thought someone would ever do, so the behaviour comes down to the quirks of whatever text-to-number library function the program happened to use (eg. atoi, strtol, boost::lexical_cast, etc). Some of those will treat leading zeroes as octal and some won't.