> I think this should cause an error instead of:
>
> rmh@bombadil:~$ ping 1
> PING 1 (0.0.0.1): 56 data bytes
I believe this is intended and a feature that comes from using
getaddrinfo. Several programs behave the same -- you can use "short"
numeric addresses like '1', '1.2', '4711' etc and it is translated into
an IP address.
root@sid:~# ping 1.2
PING 1.2 (1.0.0.2): 48 data bytes
root@sid:~# nc -v -v 1.2 80
1.2: inverse host lookup failed: Unknown host
(UNKNOWN) [1.0.0.2] 80 (http) open
root@sid:~# telnet 1.2
Trying 1.0.0.2...
root@sid:~# ifconfig eth0 1.2
root@sid:~# ifconfig eth0 |head -2|tail -1
inet addr:1.0.0.2 Bcast:1.255.255.255 Mask:255.0.0.0
root@sid:~#
Unless you object, I suggest we close this bug report.
/Simon
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]