INN commit: trunk/innd (art.c)
INN Commit
Russ_Allbery at isc.org
Fri May 1 09:07:47 UTC 2009
Date: Friday, May 1, 2009 @ 02:07:45
Author: iulius
Revision: 8438
Properly log the incoming peer name when there is a reject
because the headers of the article are not valid.
Thanks to Petr Novopashenniy for having reported this issue.
Modified:
trunk/innd/art.c
-------+
art.c | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
Modified: art.c
===================================================================
--- art.c 2009-05-01 09:04:34 UTC (rev 8437)
+++ art.c 2009-05-01 09:07:45 UTC (rev 8438)
@@ -413,6 +413,8 @@
data->Feedsite = hops[0];
else
data->Feedsite = "localhost";
+ } else if (cp->Address.ss_family != 0) {
+ data->Feedsite = RChostname(cp);
}
}
ARTlog(data, ART_REJECT, text != NULL ? text : cp->Error);
@@ -1958,6 +1960,14 @@
article = &cp->In;
artclean = ARTclean(data, cp->Error, ihave);
+ /* We have not parsed the Path: header yet. We do not check for logipaddr
+ * right now (it will be done afterwards and change data->Feedsite
+ * in consequence). We assign a feed site for the next call to ARTlog(). */
+ data->Feedsite = RChostname(cp);
+ if (data->Feedsite == NULL)
+ data->Feedsite = CHANname(cp);
+ data->FeedsiteLength = strlen(data->Feedsite);
+
/* If we don't have Path or Message-ID, we can't continue. */
if (!artclean && (!HDR_FOUND(HDR__PATH) || !HDR_FOUND(HDR__MESSAGE_ID))) {
/* cp->Error is set since Path: and Message-ID: are required headers and one
@@ -1980,9 +1990,6 @@
hops = data->Path.List;
if (innconf->logipaddr) {
- data->Feedsite = RChostname(cp);
- if (data->Feedsite == NULL)
- data->Feedsite = CHANname(cp);
if (strcmp("0.0.0.0", data->Feedsite) == 0 || data->Feedsite[0] == '\0')
data->Feedsite = hops && hops[0] ? hops[0] : CHANname(cp);
} else {
More information about the inn-committers
mailing list