Skip Menu |

Download (untitled) / with headers
text/plain 4.2KiB
From Sat Nov 23 00:24:37 1996
Received: from (TERTIUS.MIT.EDU []) by rt-11.MIT.EDU (8.7.5/8.7.3) with SMTP id AAA15712 for <>; Sat, 23 Nov 1996 00:24:33 -0500
Received: (from hartmans@localhost) by (8.6.12/8.6.9) id AAA07259 for bugs@rt-11; Sat, 23 Nov 1996 00:24:32 -0500
Received: from SOUTH-STATION-ANNEX.MIT.EDU by po10.MIT.EDU (5.61/4.7) id AA18282; Sat, 23 Nov 96 00:18:45 EST
Received: from by MIT.EDU with SMTP
id AA17602; Sat, 23 Nov 96 00:18:43 EST
Received: by (8.7.5/8.6.12GNU) id AAA06633 for; Sat, 23 Nov 1996 00:18:40 -0500 (EST)
Message-Id: <>
Date: Sat, 23 Nov 1996 00:18:40 -0500 (EST)
From: "Charles M. Hannum" <>
Subject: telnet patch

Show quoted text
>Number: 233
>Category: telnet
>Synopsis: telnet patch
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: hartmans
>State: closed
>Class: sw-bug
>Submitter-Id: unknown
>Arrival-Date: Sat Nov 23 00:25:03 EST 1996
>Last-Modified: Sat Nov 23 00:54:01 EST 1996

Responsible-Changed-From-To: gnats-admin->hartmans
Responsible-Changed-By: hartmans
Responsible-Changed-When: Sat Nov 23 00:26:01 1996
Assign to sam,

State-Changed-From-To: open-closed
State-Changed-By: hartmans
State-Changed-When: Sat Nov 23 00:44:10 1996
Fixed by applying patch. I removed the reverse resolve
as we already do that somewhere else. [233]

From: John Hawkinson <jhawk@MIT.EDU>
To: krb5-bugs@MIT.EDU
Cc: krb5-prs@RT-11.MIT.EDU
Subject: Re: pending/233: telnet patch
Date: Sat, 23 Nov 1996 00:53:16 -0500

Show quoted text
> The `-1' doesn't work on a 64-bit system (NetBSD/alpha).

This is fine (modulo the lack of INADDR_NONE under 4.3BSD).

Show quoted text
> Also, it's nice to display the host name even if the person typed in
> an IP address.

This is not. This patch isn't going to be committed because telnet
already reverse-resolves the IP address later on, at least in some cases.

Nevertheless, reverse-resolution of IP addresses specified to telnet
is in general a bad idea, for a number of reasons:

1) It is not a program's business to reverse-resolve its

2) The only reason to display an IP address
in the case of a hostname being entered is because
a hostname can map to multiple IP addresses and it is
important to know which one is connected to.

3) In the event of a infrastructure failure (for instance,
a case where DNS has to time out in a painful fashion),
a user may enter an IP address. They should not be burdened
with a slow response time due to reverse-resolution.

Some of these are seemingly obviated by the necessity of reverse-resolution
in the case of Kerberos authentication; I will be submitting code to
allow user-specification of the principal to authenticate as (-P) to
alleviate this problem.

Show quoted text
The `-1' doesn't work on a 64-bit system (NetBSD/alpha). Also, it's
nice to display the host name even if the person typed in an IP

(Both of these are straight out of the NetBSD source tree.)

Index: commands.c
RCS file: /afs/,v
retrieving revision 5.25
diff -c -2 -r5.25 commands.c
*** commands.c 1996/11/11 02:13:36 5.25
--- commands.c 1996/11/22 18:26:51
*** 2444,2451 ****
temp = inet_addr(hostp);
! if (temp != (unsigned long) -1) {
sin.sin_addr.s_addr = temp;
sin.sin_family = AF_INET;
! (void) strcpy(_hostname, hostp);
hostname = _hostname;
} else {
--- 2444,2455 ----
temp = inet_addr(hostp);
! if (temp != INADDR_NONE) {
sin.sin_addr.s_addr = temp;
sin.sin_family = AF_INET;
! host = gethostbyaddr((char *)&temp, sizeof(temp), AF_INET);
! if (host)
! (void) strcpy(_hostname, host->h_name);
! else
! (void) strcpy(_hostname, hostp);
hostname = _hostname;
} else {