From:	ADVAX::"mcnc!VM1.NoDak.EDU!sloane%KUHUB.CC.UKANS.EDU" 13-FEB-1991 14:44:10.74
To:	Multiple recipients of list ANU-NEWS <ANU-NEWS@NDSUVM1>
CC:	
Subj:	Re: NNTP with Multinet, access not working

Received: by ADVAX.DECnet (utk-mail11 v1.5) ; Wed, 13 Feb 91 14:43:44 EST
Received:  from mcnc by ge-dab.GE.COM (5.61/GE-DAB 1.15) with UUCP
	id AA09355 for ; Wed, 13 Feb 91 14:11:18 -0500
Received: from VM1.NoDak.EDU by mcnc.mcnc.org (5.59/MCNC/6-11-90)
	id AA01994; Wed, 13 Feb 91 12:37:00 -0500
	for ARISIA.DNET.ge.com!EVERHART
Message-Id: <9102131737.AA01994@mcnc.mcnc.org>
Received: from NDSUVM1.BITNET by VM1.NoDak.EDU (IBM VM SMTP R1.2.1MX) with BSMTP id 9754; Wed, 13 Feb 91 11:36:33 CST
Received: from NDSUVM1.BITNET by NDSUVM1.BITNET (Mailer R2.07) with BSMTP id
 1897; Wed, 13 Feb 91 11:36:25 CST
Date:         Wed, 13 Feb 91 11:00:57 CST
Reply-To: mcnc!VM1.NoDak.EDU!sloane%KUHUB.CC.UKANS.EDU
Sender: ANU-NEWS Discussion <ANU-NEWS@VM1.NoDak.EDU>
From: mcnc!VM1.NoDak.EDU!sloane%KUHUB.CC.UKANS.EDU
Subject:      Re: NNTP with Multinet, access not working
To: Multiple recipients of list ANU-NEWS <ANU-NEWS@NDSUVM1>
 
In article <1991Feb12.174048.32@kahuna.asd-yf.wpafb.af.mil>,
 nieland_t@kahuna.asd-yf.wpafb.af.mil writes:
> Is there a definative version of NNTP (server) for Multinet.  The version
> distributed  with ANU NEWS 6.0.1 doesn't do the best of jobs.  On one system i
t
> looks to be  working fine, but on another, however, it will only work with the
> generic hostname "TCP" set up, which is a little to open for me.
>
> The following is a log from running NNTP_Client to the machine that is being
> picky:
>
> $ run nentp_client
> Node: nodename
> Channel (DECNET, MULTINETtcp)? [DECNET]: Multi
> gethostbyaddr: error 1 200 ANU NEWS/NNTP server nodename (V6.0)
 
The problem is that the server machine is unable to look up the host
name for the client system, given the numeric address.  Try doing
 
$ MU NSLOOKUP/TYPE=PTR nnn.nnn.nnn.nnn
 
on the numeric address of the client machine. That should give you
some indication of why the lookup is failing.
 
> Note the error on gethostbyaddr. The code indicates that this was written for
> WIN (which I shutter to think about).  Is there any patches or replacement
> code to make this work better with Multinet?
 
It seems to work just fine as long as the numeric address can be
mapped back to a host name.  I made some changes in the getremhost
routine in NNTP_TCPWINMULTINET.C to allow authorizing remote hosts by
numeric address.  Change getremhost as follows:
 
 if (remhost) {
   namelen=sizeof(name);
   getpeername(f_i,&name,&namelen);
   hp = gethostbyaddr(&name.sa_data[2],4,AF_INET);
   if (hp == NULL) {
                                              /* fprintf and strcpy deleted */
      sprintf (remhost,"%d.%d.%d.%d",                                  /*NEW*/
               (name.sa_data[2]<0?name.sa_data[2]+256:name.sa_data[2]),/*NEW*/
               (name.sa_data[3]<0?name.sa_data[3]+256:name.sa_data[3]),/*NEW*/
               (name.sa_data[4]<0?name.sa_data[4]+256:name.sa_data[4]),/*NEW*/
               (name.sa_data[5]<0?name.sa_data[5]+256:name.sa_data[5]) /*NEW*/
              );                                                       /*NEW*/
     }
   else
     strcpy(remhost,hp->h_name);
   }
 
There is probably some better way to get the numeric address, but the
above seems to work.  It also has the advantage of logging the numeric
address of people who try to access the server but get rejected.
--
USmail: Bob Sloane, University of Kansas Computer Center, Lawrence, KS, 66045
E-mail: sloane@kuhub.cc.ukans.edu, sloane@ukanvax.bitnet, AT&T: (913)864-0444
