nntp server fixes for Sun4/SunOS4.x
Jon A. Tankersley
zjat02 at apctrc.trc.amoco.com
Wed Jun 7 01:24:10 AEST 1989
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 at apctrc.trc.amoco.com ..!uunet!apctrc!tank
More information about the Comp.sources.bugs
mailing list