Article View: comp.sources.bugs
Article #2264nntp server fixes for Sun4/SunOS4.x
From: Jon A. Tankersley
Date: Tue, 06 Jun 1989 15:24
Date: Tue, 06 Jun 1989 15:24
74 lines
2597 bytes
2597 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:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!cs.utexas.edu!uunet!apctrc!zjat02Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!cs.utexas.edu!uunet!apctrc!zjat02 From: zjat02@apctrc.trc.amoco.com (Jon A. Tankersley) Newsgroups: comp.sources.bugs,news.software.nntp Subject: nntp server fixes for Sun4/SunOS4.x Message-ID: <902@apctrc.UUCP> Date: 6 Jun 89 15:24:10 GMT Sender: news@apctrc.UUCP Reply-To: zjat02@apctrc.trc.amoco.com (Jon A. Tankersley) Organization: Amoco Production Company, Tulsa Research Center Lines: 74