Opened 16 years ago

Closed 16 years ago

Last modified 9 years ago

#15450 closed defect (fixed)

mtr unable to resolve hostname arguements on Mac OS X 10.5.3

Reported by: bahamat@… Owned by: mr_bond@…
Priority: Normal Milestone:
Component: ports Version: 1.6.0
Keywords: 10.5.3 Cc:
Port:

Description

When using mtr from the command line, hostnames I pass to it apparently lost. If I pass an IP address mtr operates normally.

$ ping -c 1 mina
PING mina.local (10.10.10.30): 56 data bytes
64 bytes from 10.10.10.30: icmp_seq=0 ttl=64 time=0.191 ms

--- mina.local ping statistics ---
1 packets transmitted, 1 packets received, 0% packet loss
round-trip min/avg/max/stddev = 0.191/0.191/0.191/0.000 ms
$ mtr mina
nodename nor servname provided, or not known: Undefined error: 0
$ mtr -rc 1 mina
nodename nor servname provided, or not known: Undefined error: 0
$ mtr -rc 1 10.10.10.30
HOST: aeris.local                 Loss%   Snt   Last   Avg  Best  Wrst StDev
  1. mina.local                    0.0%     1    0.4   0.4   0.4   0.4   0.0
$ 

Attachments (1)

mtr.c.patch (401 bytes) - added by krb0@… 16 years ago.
mtr.c.patch

Download all attachments as: .zip

Change History (4)

comment:1 Changed 16 years ago by krb0@…

Not sure what the thought was behind "0".

--- mtr.c.orig 2008-05-29 17:21:17.000000000 -0700 +++ mtr.c 2008-05-29 17:21:30.000000000 -0700 @@ -384,7 +384,7 @@

bzero( &hints, sizeof hints ); hints.ai_family = af; hints.ai_socktype = SOCK_DGRAM;

  • error = getaddrinfo( Hostname, "0", &hints, &res );

+ error = getaddrinfo( Hostname, "", &hints, &res );

if ( error ) {

perror( gai_strerror(error) ); exit( EXIT_FAILURE );

Version 0, edited 16 years ago by krb0@… (next)

Changed 16 years ago by krb0@…

Attachment: mtr.c.patch added

mtr.c.patch

comment:2 Changed 16 years ago by mr_bond@…

Owner: changed from macports-tickets@… to mr_bond@…

Will fix when I get home from work in a couple of hours if it's not commited yet.

comment:3 Changed 16 years ago by mr_bond@…

Resolution: fixed
Status: newclosed

Thanks, fixed in r37346

Note: See TracTickets for help on using tickets.