[news.software.nntp] NNTP 1.5 problems on a Sun 4

andhal@auto-trol.UUCP (Andrew Halls) (07/25/89)

I'm having trouble installing nntp on a Sun 4, SunOS 4.0.1

When I try to run rrn, remotely I get the following messages
in the servers log file:
Jul 25 09:03:17 auto-trol nntpd[3839]: host_access: getpeername: Socket is not connected
Jul 25 09:03:17 auto-trol inetd[175]: /usr/etc/nntpd: exit status 1

I get the following message from rrn:

Unexpected response code from auto-trol news server: 0

From my *limited* understanding of the source inetd is not setting up the socket correctly.

My entry in the inetd.conf file is:
nntp    stream  tcp     wait    root    /usr/etc/nntpd          nntpd

If I use nowait I get the same results except there are no messages in the log.

I'm looking for suggestion on how to trouble shoot this problem.

Thanks

-- 
Andy Halls
{...}ncar!ico!auto-trol!andhal                      Auto-trol Technology Corporation
                                              	    12500 North Washington Street
(303)-252-2166                                      Denver, CO 80241-2404

karl@triceratops.cis.ohio-state.edu (Karl Kleinpaste) (07/26/89)

andhal@auto-trol.uucp writes:
   I'm having trouble installing nntp on a Sun 4, SunOS 4.0.1

Install this patch, if you haven't already.  It corrects problems
caused by a too-lenient equivalence of long with struct inaddr.  On a
Sun4, a struct inaddr is 8(?) bytes long.

I first posted this last February, but I don't think it's showing up
in current NNTP distributions.

--Karl

*** subnet.c~	Thu Feb 16 15:41:10 1989
--- subnet.c	Thu Feb 16 16:15:00 1989
***************
*** 90,95 ****
--- 90,96 ----
  	register struct ifreq	*ifr;
  	u_long		inet_netof();
  	u_long		addr;
+ 	struct in_addr duh;
  
  	/*
  	 * Find out how many interfaces we have, and malloc
***************
*** 134,140 ****
  		if (ifr->ifr_addr.sa_family != AF_INET)
  			continue;
  		addr = (*(struct sockaddr_in *)&ifr->ifr_addr).sin_addr.s_addr;
! 		in_ifsni[j].i_net = inet_netof(addr);
  		if (ioctl(s, SIOCGIFNETMASK, ifr) < 0)
  			continue;
  		in_ifsni[j].i_subnetmask =
--- 135,142 ----
  		if (ifr->ifr_addr.sa_family != AF_INET)
  			continue;
  		addr = (*(struct sockaddr_in *)&ifr->ifr_addr).sin_addr.s_addr;
! 		duh.s_addr = addr;
! 		in_ifsni[j].i_net = inet_netof(duh);
  		if (ioctl(s, SIOCGIFNETMASK, ifr) < 0)
  			continue;
  		in_ifsni[j].i_subnetmask =
***************
*** 198,205 ****
  	register u_long	i = ntohl(in);
  	register u_long	net;
  	u_long		inet_netof(), inet_lnaof();
  
! 	net = inet_netof(in);
  
  	/*
  	 * Check whether network is a subnet;
--- 200,209 ----
  	register u_long	i = ntohl(in);
  	register u_long	net;
  	u_long		inet_netof(), inet_lnaof();
+ 	struct in_addr duh;
  
! 	duh.s_addr = in;
! 	net = inet_netof(duh);
  
  	/*
  	 * Check whether network is a subnet;
***************
*** 212,218 ****
  		if (net == in_ifsni[j].i_net) {
  #endif
  			net = i & in_ifsni[j].i_subnetmask;
! 			if (inet_lnaof(htonl(net)) == 0)
  				return (0);
  			else
  				return (net >> in_ifsni[j].i_bitshift);
--- 216,223 ----
  		if (net == in_ifsni[j].i_net) {
  #endif
  			net = i & in_ifsni[j].i_subnetmask;
! 			duh.s_addr = htonl(net);
! 			if (inet_lnaof(duh) == 0)
  				return (0);
  			else
  				return (net >> in_ifsni[j].i_bitshift);