Article View: news.software.nntp
Article #9898Re: nnrpd and "strange" log entries (bug ?)
From: Fabien TASSIN
Date: Tue, 06 Aug 1996 00:00
Date: Tue, 06 Aug 1996 00:00
54 lines
2497 bytes
2497 bytes
Tomasz R Surmacz wrote:
>
> :| >Jul 15 17:24:00 news nnrpd[2263]: ? cant getpeername Connection reset by peer
> :| >Jul 15 17:24:00 news nnrpd[2263]: exit articles 0 groups 0
> :| >Jul 15 17:24:00 news nnrpd[2263]: times user 0.030 system 0.070 elapsed 0.013
>
> From my experience it seems that it happens mainly to dialup ppp/slip
> connections to ISPs which do not provide reverse DNS for such addresses.
> Not logging the hostname by nntpd is a bug in my opinion (it could log
> 'UNKNOWN' if it cannot get the name) as it breaks the log analyzing
> scripts used by news.daily.
>
> Anybody got fix for this?
yes.
This will be corrected in INN 1.5 (thanx to ISC)
My small patch for INN 1.4* (to keep the log clean):
$ diff -c nnrpd/nnrpd.c.orig nnrpd/nnrpd.c
*** nnrpd.c.orig Tue Jul 23 11:26:56 1996
--- nnrpd.c Tue Jul 23 11:34:09 1996
***************
*** 4,9 ****
--- 4,16 ----
** This server doesn't do any real load-limiting, except for what has
** proven empirically necesary (i.e., look at GRPscandir).
*/
+
+
+ /* Changed by Fabien TASSIN (tassin@eerie.fr)
+ ** - problem with ClientAddr when getpeername() returns < 0
+ ** in StartConnect()
+ */
+
#define MAINLINE
#include <signal.h>
#include "nnrpd.h"
***************
*** 368,373 ****
--- 375,381 ----
if (getpeername(STDIN, (struct sockaddr *)&sin, &length) < 0) {
if (!isatty(STDIN)) {
syslog(L_ERROR, "%s cant getpeername %m", "?");
+ (void)strcpy(ClientHost, "?");
Printf("%d I can't get your name. Goodbye.\r\n", NNTP_ACCESS_VAL);
ExitWithStats(1);
}
--
Fabien TASSIN - EERIE Nimes - CRI Rennes
tassin@eerie.fr - Fabien.Tassin@univ-rennes1.fr
Technical Details
Message-ID:
<32070A0D.3D54@eerie.fr>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mailReferences:
<31F4D08C.46EF@eerie.fr> <jcaron-0208960104200001@mon4-11.planete.net> <4u58et$rc2@nerd.apk.net>Show Full Headers
Complete Article Headers
Message-ID: <32070A0D.3D54@eerie.fr> Subject: Re: nnrpd and "strange" log entries (bug ?) Date: Tue, 06 Aug 1996 00:00:00 +0000 From: Fabien TASSIN <tassin@eerie.fr> References: <31F4D08C.46EF@eerie.fr> <jcaron-0208960104200001@mon4-11.planete.net> <4u58et$rc2@nerd.apk.net> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mail X-Deja-AN: 172411054 Content-type: text/plain; charset=us-ascii Organization: EERIE - Nimes (France) Mime-version: 1.0 Newsgroups: news.software.nntp X-mailer: Mozilla 3.0b4 (X11; I; SunOS 5.4 sun4d)