Return to BSD News archive
Path: sserve!newshost.anu.edu.au!harbinger.cc.monash.edu.au!yarrina.connect.com.au!werple.apana.org.au!otis.apana.org.au!serval.net.wsu.edu!netnews.nwnet.net!oracle.pnl.gov!osi-east2.es.net!lll-winken.llnl.gov!uwm.edu!spool.mu.edu!howland.reston.ans.net!nctuccca.edu.tw!news.cc.nctu.edu.tw!news.csie.nctu.edu.tw!jdli From: jdli@csie.nctu.edu.tw (醉生夢死 無言以對) Newsgroups: comp.os.386bsd.bugs Subject: Re: FreeBSD 2.0a telnetd not resolving hostnames? Date: 22 Nov 1994 12:16:59 GMT Organization: 柔雲織成的夢中.... Lines: 24 Message-ID: <3asnfr$f2e@news.csie.nctu.edu.tw> References: <1994Nov22.104030.17108@galileo.cc.rochester.edu> Reply-To: jdli@csie.nctu.edu.tw NNTP-Posting-Host: jdli@ccsun8.csie.nctu.edu.tw X-Newsreader: TIN [version 1.2 PL2] => 還記得 [Eric Volpe (ev002b@uhura.cc.rochester.edu)] 曾說 ..... ) connections. If I telnet in to the machine from anywhere except localhost, ) the address it records (to utmp,wtmp,etc..) is the numerical host address I use this on NetBSD, it works fine. It should be similar in FreeBSD since their source are similar. diff -c telnetd/telnetd.c mytelnetd/telnetd.c *** telnetd/telnetd.c Fri Feb 25 18:55:11 1994 --- mytelnetd/telnetd.c Sat Nov 12 20:20:30 1994 *************** *** 809,814 **** --- 809,817 ---- } else if (hp && (strlen(hp->h_name) <= ((utmp_len < 0) ? -utmp_len : utmp_len))) { host = hp->h_name; + } else if (hp && (utmp_len > 0)) { + hp->h_name[utmp_len] = '\0'; + host = hp->h_name; } else { host = inet_ntoa(who->sin_addr); }