Date: Wed, 21 Aug 2002 04:00:06 -0700 (PDT) From: Maxim Maximov <mcsi@agava.com> To: freebsd-bugs@FreeBSD.org Subject: Re: bin/41841: telnet client can't resolve hostname in -s option Message-ID: <200208211100.g7LB06Db080055@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/41841; it has been noted by GNATS.
From: Maxim Maximov <mcsi@agava.com>
To: FreeBSD-gnats-submit@FreeBSD.ORG
Cc:
Subject: Re: bin/41841: telnet client can't resolve hostname in -s option
Date: Wed, 21 Aug 2002 14:54:07 +0400
From src/usr.bin/telnet/command.c:
if (src_addr != NULL) {
memset(&hints, 0, sizeof(hints));
hints.ai_flags = AI_NUMERICHOST;
hints.ai_family = family;
hints.ai_socktype = SOCK_STREAM;
error = getaddrinfo(src_addr, 0, &hints, &src_res);
note "hints.ai_flags = AI_NUMERICHOST". it states, that "a non-NULL
nodename string must be a numeric host address string." (excerpt from
getaddrinfo(3))
so either manpage lies, or one should remove this string from commands.c
Dmitry Pryanishnikov wrote:
>>Number: 41841
>>Category: bin
>>Synopsis: telnet client can't resolve hostname in -s option
>>Confidential: no
>>Severity: serious
>>Priority: medium
>>Responsible: freebsd-bugs
>>State: open
>>Quarter:
>>Keywords:
>>Date-Required:
>>Class: sw-bug
>>Submitter-Id: current-users
>>Arrival-Date: Wed Aug 21 03:30:01 PDT 2002
>>Closed-Date:
>>Last-Modified:
>>Originator: Dmitry Pryanishnikov
>>Release: FreeBSD 4.6-RELEASE-p1 i386
>>Organization:
>
> Atlantis ISP
>
>>Environment:
>>Description:
>
> Telnet client can't resolve host name given with -s option:
> "telnet -s host" doesn't work while "telnet -s IP" works.
>
>>How-To-Repeat:
>
>
> dmitry@atlantis$ telnet localhost
> Trying 127.0.0.1...
> telnet: connect to address 127.0.0.1: Connection refused
> telnet: Unable to connect to remote host
>
> So "localhost" resolves OK...
>
> dmitry@atlantis$ telnet -s localhost localhost
> localhost: hostname nor servname provided, or not known
>
> ...except in -s option!
>
> dmitry@atlantis$ telnet -s 127.0.0.1 localhost
> Trying 127.0.0.1...
> telnet: connect to address 127.0.0.1: Connection refused
> telnet: Unable to connect to remote host
>
> -s IP still works.
>
>>Fix:
>
> Don't know.
>
>>Release-Note:
>>Audit-Trail:
>>Unformatted:
>
> >System: FreeBSD atlantis.atlantis.dp.ua 4.6-RELEASE-p1 FreeBSD 4.6-RELEASE-p1 #0: Sat Jul 6 17:31:08 EEST 2002 root@atlantis.dp.ua:/usr/src/sys/compile/ATLANTIS i386
>
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-bugs" in the body of the message
--
Maxim Maximov
System Administrator
AGAVA Software (http://www.agava.com)
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200208211100.g7LB06Db080055>
