From sia@seagull.nest.org  Sat Sep 27 03:02:39 1997
Received: from seagull.nest.org (sia@ip34.nest.org [204.94.139.34])
          by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id DAA15211
          for <FreeBSD-gnats-submit@freebsd.org>; Sat, 27 Sep 1997 03:02:38 -0700 (PDT)
Received: (from sia@localhost) by seagull.nest.org (8.8.5/8.6.12) id DAA20844; Sat, 27 Sep 1997 03:02:35 -0700 (PDT)
Message-Id: <199709271002.DAA20844@seagull.nest.org>
Date: Sat, 27 Sep 1997 03:02:35 -0700 (PDT)
From: sia@nest.org
Reply-To: sia@nest.org
To: FreeBSD-gnats-submit@freebsd.org
Subject: telnet tries to resolve numerical IP address of remote host
X-Send-Pr-Version: 3.2

>Number:         4638
>Category:       bin
>Synopsis:       telnet tries to resolve numerical IP address of remote host
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Sep 27 03:10:01 PDT 1997
>Closed-Date:    Sat Jan 2 09:58:04 PST 1999
>Last-Modified:  Sat Jan  2 10:01:56 PST 1999
>Originator:     Igor Sviridov
>Release:        FreeBSD 2.2.2-RELEASE i386
>Organization:
>Environment:

	FreeBSD 2.2.2-RELEASE

>Description:

telnet tries to lookup _numerical_ IP address of remote host; if your
resolver is not answering it will hang; this is particulary annoying if you're
trying to use telnet to fix problems causing DNS failure...

this is new behaviour introuduced between 2.1.7-RELEASE and 2.2.2-RELEASE

>How-To-Repeat:

Script started on Sat Sep 27 02:57:46 1997
1 rt@sl:p5.0 ~# ex /etc/resolv.conf
/etc/resolv.conf: unmodified: line 3
:%s/^nameserver/#nameserver/
#nameserver 127.0.0.1
:$
search nest.org jriver.com cs.kiev.ua
:a
nameserver 1.2.3.4
.
:x
/etc/resolv.conf: 4 lines, 106 characters
2 rt@sl:p5.0 ~# telnet 193.124.54.50
/* telnet hangs... */
^C
3 rt@sl:p5.0 ~# ^D

Script done on Sat Sep 27 02:58:39 1997

>Fix:
	
	

>Release-Note:
>Audit-Trail:

From: Greg Minshall <minshall@fiberlane.com>
To: freebsd-gnats-submit@freebsd.org, sia@nest.org
Cc:  Subject: Re: bin/4638: telnet tries to resolve numerical IP address of remote 
 host
Date: Fri, 17 Jul 1998 10:15:08 -0700

 I agree this is a problem.  It was created in CVS version 1.6 of 
 usr.bin/telnet/commands.c (see context diff fragment below).
 
 What mechanism to get this fixed?  I'm happy to provide a context diff to 
 freebsd-current (whatever).
 
 (Dave Borman, by the way, says he isn't aware of the addition of 
 gethostbyaddr() to telnet.)
 
 Greg Minshall
 
State-Changed-From-To: open->closed 
State-Changed-By: billf 
State-Changed-When: Sat Jan 2 09:58:04 PST 1999 
State-Changed-Why:  
The -N option for telnet(1) skips the reverse lookup, this was added: 
to -CURRENT: Mon Dec 14 22:40:38 1998 UTC by billf  
to -STABLE: Sat Dec 26 18:49:57 1998 UTC by billf 

The code for this options was written by Steinar Haug <sthaug@nethelp.no> 
>Unformatted:
