From owner-freebsd-bugs Wed Aug 21 4: 0:16 2002 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3BFBD37B400 for ; Wed, 21 Aug 2002 04:00:08 -0700 (PDT) Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id D5FBF43E70 for ; Wed, 21 Aug 2002 04:00:07 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.4/8.12.4) with ESMTP id g7LB07JU080192 for ; Wed, 21 Aug 2002 04:00:07 -0700 (PDT) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.4/8.12.4/Submit) id g7LB06Db080055; Wed, 21 Aug 2002 04:00:06 -0700 (PDT) Date: Wed, 21 Aug 2002 04:00:06 -0700 (PDT) Message-Id: <200208211100.g7LB06Db080055@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org Cc: From: Maxim Maximov Subject: Re: bin/41841: telnet client can't resolve hostname in -s option Reply-To: Maxim Maximov Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org The following reply was made to PR bin/41841; it has been noted by GNATS. From: Maxim Maximov 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