public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
* ping6
@ 2011-07-18 20:23 eric
       [not found] ` <CALJXSJqwiW0b-uM0YzNnPG1V3sR3q9J4M9_hhufK+ZFWW=Gdrg@mail.gmail.com>
  0 siblings, 1 reply; 3+ messages in thread
From: eric @ 2011-07-18 20:23 UTC (permalink / raw)
  To: netdev

Hi,
I've found what I think is a bug in the ping6 tool. Without the -n option,
it puts the hostname inside the parenthesis instead of the resolved ip
address as demonstrated below:

ericat@hydra:~/iputils-s20101006$ ping6 ipv6.he.net
PING ipv6.he.net(ipv6.he.net) 56 data bytes
64 bytes from ipv6.he.net: icmp_seq=1 ttl=58 time=186 ms

I expect output like this:

ericat@hydra:~/iputils-s20101006$ sudo ./ping6 ipv6.he.net
Password:
PING ipv6.he.net(2001:470:0:64::2) 56 data bytes
64 bytes from ipv6.he.net: icmp_seq=1 ttl=58 time=187 ms

Here's a very simple patch to ping6.c for proper behaviour:

ericat@hydra:~/iputils-s20101006$ diff ping6.c.orig ping6.c
979c979
<       printf("PING %s(%s) ", hostname, pr_addr(&whereto.sin6_addr));
---
>       printf("PING %s(%s) ", hostname, pr_addr_n(&whereto.sin6_addr));

Cheers,
Eric Atkin



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: ping6
       [not found] ` <CALJXSJqwiW0b-uM0YzNnPG1V3sR3q9J4M9_hhufK+ZFWW=Gdrg@mail.gmail.com>
@ 2011-07-19  2:06   ` Jérôme Poulin
  2011-07-19 13:53     ` ping6 Krzysztof Olędzki
  0 siblings, 1 reply; 3+ messages in thread
From: Jérôme Poulin @ 2011-07-19  2:06 UTC (permalink / raw)
  To: eric; +Cc: netdev

On Mon, Jul 18, 2011 at 4:23 PM, <eric@certus.bz> wrote:
>
> I've found what I think is a bug in the ping6 tool. Without the -n option,
> it puts the hostname inside the parenthesis instead of the resolved ip

I guess this is on purpose as IPv6 has very long IP and hostnames
should be used when possible, also, it does not show the hostname you
typed but the resolved RDNS of the IP as in:

jerome@MobileCPU ~ $ ping6 www.google.ca
PING www.google.ca(iad04s01-in-x63.1e100.net) 56 data bytes
64 bytes from iad04s01-in-x63.1e100.net: icmp_seq=1 ttl=55 time=57.7 ms

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: ping6
  2011-07-19  2:06   ` ping6 Jérôme Poulin
@ 2011-07-19 13:53     ` Krzysztof Olędzki
  0 siblings, 0 replies; 3+ messages in thread
From: Krzysztof Olędzki @ 2011-07-19 13:53 UTC (permalink / raw)
  To: Jérôme Poulin; +Cc: eric, netdev

On 2011-07-19 04:06, Jérôme Poulin wrote:
> On Mon, Jul 18, 2011 at 4:23 PM,<eric@certus.bz>  wrote:
>>
>> I've found what I think is a bug in the ping6 tool. Without the -n option,
>> it puts the hostname inside the parenthesis instead of the resolved ip
>
> I guess this is on purpose as IPv6 has very long IP and hostnames
> should be used when possible, also, it does not show the hostname you
> typed but the resolved RDNS of the IP as in:
>
> jerome@MobileCPU ~ $ ping6 www.google.ca
> PING www.google.ca(iad04s01-in-x63.1e100.net) 56 data bytes
> 64 bytes from iad04s01-in-x63.1e100.net: icmp_seq=1 ttl=55 time=57.7 ms

Hello,

Even if so it makes no sense to me. You end up without knowing which 
host you are pinging and a typical terminal is wide enough to display 
even longest IPv6 addresses.

Best regards,


			Krzysztof Olędzki

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-07-19 14:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-18 20:23 ping6 eric
     [not found] ` <CALJXSJqwiW0b-uM0YzNnPG1V3sR3q9J4M9_hhufK+ZFWW=Gdrg@mail.gmail.com>
2011-07-19  2:06   ` ping6 Jérôme Poulin
2011-07-19 13:53     ` ping6 Krzysztof Olędzki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox