Thread View: news.software.nntp
1 messages
1 total messages
Started by Julio Sanchez
Fri, 21 Feb 1997 00:00
Fix for hosts.nntp.nolimit
Author: Julio Sanchez
Date: Fri, 21 Feb 1997 00:00
Date: Fri, 21 Feb 1997 00:00
43 lines
2087 bytes
2087 bytes
I gotta be missing something, but has anyone ever tried lowering
parameter i and defining exceptions in hosts.nntp.nolimit?
Did it work? As far as I can see from the code, the call to RCnolimit
to check if the host is in the exception list happens before the
cp->Address field is set. Quick and dirty fix follows (calling get
getpeername is ugly, because we got the address at the accept, only
that passing it to CHANcreate requires changing the interfaces and
that should be done by someone else):
diff -u ../innd.orig/nc.c ./nc.c
--- ../innd.orig/nc.c Tue Dec 17 15:40:40 1996
+++ ./nc.c Fri Feb 21 13:33:46 1997
@@ -1386,6 +1386,8 @@
{
register CHANNEL *cp;
int i;
+ struct sockaddr_in wherefrom;
+ int wherefroml;
/* Create the channel. */
cp = CHANcreate(fd, CTnntp, MustAuthorize ? CSgetauth : CSgetcmd,
@@ -1427,6 +1429,10 @@
NCwriteshutdown(cp, RejectReason);
return cp;
}
+
+ wherefroml = sizeof wherefrom;
+ getpeername(cp->fd, (struct sockaddr *)&wherefrom, &wherefroml);
+ cp->Address = wherefrom.sin_addr;
/* See if we have too many channels. */
if (!IsLocal && MaxIncoming && NCcount >= MaxIncoming && !RCnolimit(cp)) {
--
Julio Sanchez, SGI Soluciones Globales Internet
Tel: (91) 804 28 37 Fax: (91) 804 14 05 WWW: http://www.esegi.es
jsanchez@esegi.es jsanchez@gmv.es
PGP Key fingerprint = E5 29 93 6F 41 4E 00 E2 90 11 A1 8C 72 D0 DE 71
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads