🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #189

nntp server fixes for Sun4/SunOS4.x

#189
From: Jon A. Tankersley
Date: Tue, 06 Jun 1989 15:24
75 lines
2811 bytes
Debugged a problem with the server software (nntpd) while running on a Sun4.
access_inet.c and subnet.c had to be patched.  Enclosed are the patches.

Has anyone updated nntp/rrn to handle the userid along with the host on
the syslog entries?  Just host info isn't enough when hosts are terminal
servers or when users can run from different systems.


*** access_inet.c	Thu Mar  2 11:24:29 1989
--- access_inet.c.BAK	Wed Mar  1 09:25:21 1989
***************
*** 62,69 ****
  		(void) strcpy(net_name,inet_ntoa(*(struct in_addr *)&net_addr));
  
  #ifdef SUBNET
! /*	subnet_addr = inet_snetof(sin->sin_addr.s_addr); */
! 	subnet_addr = inet_snetof(sin->sin_addr);
  	if (subnet_addr == 0)
  		subnet_name[0] = '\0';
  	else {
--- 62,68 ----
  		(void) strcpy(net_name,inet_ntoa(*(struct in_addr *)&net_addr));
  
  #ifdef SUBNET
! 	subnet_addr = inet_snetof(sin->sin_addr.s_addr);
  	if (subnet_addr == 0)
  		subnet_name[0] = '\0';
  	else {
*** subnet.c	Thu Mar  2 11:36:53 1989
--- subnet.c.BAK	Wed Mar  1 09:26:12 1989
***************
*** 192,202 ****
  
  u_long
  inet_snetof(in)
! 	struct in_addr in;
! /*	u_long	in; */
  {
  	register int	j;
- 	struct in_addr	tmp_in;
  	register u_long	i = ntohl(in.s_addr);
  	register u_long	net;
  	u_long		inet_netof(), inet_lnaof();
--- 192,200 ----
  
  u_long
  inet_snetof(in)
! 	u_long	in;
  {
  	register int	j;
  	register u_long	i = ntohl(in.s_addr);
  	register u_long	net;
  	u_long		inet_netof(), inet_lnaof();
***************
*** 214,221 ****
  		if (net == in_ifsni[j].i_net) {
  #endif
  			net = i & in_ifsni[j].i_subnetmask;
! 			tmp_in.s_addr = htonl(net);
! 			if (inet_lnaof(tmp_in) == 0)
  				return (0);
  			else
  				return (net >> in_ifsni[j].i_bitshift);
--- 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);
-tank-
#include <std/disclaimer.h>		/* nobody knows the trouble I .... */
tank@apctrc.trc.amoco.com    ..!uunet!apctrc!tank
Technical Details
Message-ID: <902@apctrc.UUCP>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!cs.utexas.edu!uunet!apctrc!zjat02

Show Full Headers
Complete Article Headers
Message-ID: <902@apctrc.UUCP>
Subject: nntp server fixes for Sun4/SunOS4.x
Date: Tue, 06 Jun 1989 15:24:10 +0000
From: zjat02@apctrc.trc.amoco.com (Jon A. Tankersley)
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!cs.utexas.edu!uunet!apctrc!zjat02
Newsgroups: comp.sources.bugs,news.software.nntp
Sender: news@apctrc.UUCP
Reply-To: zjat02@apctrc.trc.amoco.com (Jon A. Tankersley)
Organization: Amoco Production Company, Tulsa Research Center
Lines: 74