🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #116

Re: nntpd on Sun4 running SunOS 4.0.1 drops core in getifconf()

#116
From: Jean Marie Diaz
Date: Fri, 17 Feb 1989 00:54
54 lines
2200 bytes

I am extremely grateful to Karl for pointing out what was going on with my
nntpd lo these many moons, and to show my gratitude, I'm going to post a
patch to his patch -- this to fix similar problems in inet_snetof().

				   AMBAR
ambar@oracle.com				 {uunet,pyramid}!oracle!ambar



*** subnet.c~	Thu Feb 16 16:49:24 1989
--- subnet.c	Thu Feb 16 16:45:23 1989
***************
*** 198,206 ****
  	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;
  	 * if so, return subnet number.
--- 198,208 ----
  	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;
  	 * if so, return subnet number.
***************
*** 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);
--- 214,221 ----
  		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);
Technical Details
Message-ID: <JDIAZ.89Feb16165439@hqsun1.oracle.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!agate!bionet!ames!claris!apple!oracle!newshost!jdiaz
References: <KARL.89Feb16162217@triceratops.cis.ohio-state.edu>

Show Full Headers
Complete Article Headers
Message-ID: <JDIAZ.89Feb16165439@hqsun1.oracle.com>
Subject: Re: nntpd on Sun4 running SunOS 4.0.1 drops core in getifconf()
Date: Fri, 17 Feb 1989 00:54:39 +0000
From: jdiaz@hqsun1.oracle.com (Jean Marie Diaz)
References: <KARL.89Feb16162217@triceratops.cis.ohio-state.edu>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!agate!bionet!ames!claris!apple!oracle!newshost!jdiaz
Newsgroups: news.software.nntp
Sender: news@oracle.uucp
Organization: Oracle Corporation, Belmont, CA
Lines: 53
In-reply-to: karl@triceratops.cis.ohio-state.edu's message of 16 Feb 89 21:22:17 GMT