interpretation of leading zeros - Multiple bases

Bug #1329938 reported by Mr. Jester
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
iputils (Ubuntu)
New
Undecided
Unassigned

Bug Description

There is a combination of randomly filling in zeros and interpreting leading zeros as octal.

root@argon:~# ping 010.001.017.001
PING 010.001.017.001 (8.1.15.1) 56(84) bytes of data.
^C
--- 010.001.017.001 ping statistics ---
2 packets transmitted, 0 received, 100% packet loss, time 1008ms

Valid Octal.

root@argon:~# ping 010.001.018.001
ping: unknown host 010.001.018.001

Invalid ocatal

root@argon:~# ping 10.1.018.1
ping: unknown host 10.1.018.1

root@argon:~# ping 10.1.017.1
PING 10.1.017.1 (10.1.15.1) 56(84) bytes of data.
^C
--- 10.1.017.1 ping statistics ---
3 packets transmitted, 0 received, 100% packet loss, time 2016ms

Combination of octal and decimal

If you are going to allow this, there should be a flag to control it. Force base10, base8, or base16. Perferrably, it would default to base10 only and require a flag or at least consistent implementation of leading characters for each octet.

I need a means of ping 010.001.017.001 without having to strip the leading zeros or converting it to octal.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.