Thread View: news.software.nntp
1 messages
1 total messages
Started by Andrew Gierth
Thu, 13 May 1999 00:00
Re: INN 2.2-stable path verification patch
Author: Andrew Gierth
Date: Thu, 13 May 1999 00:00
Date: Thu, 13 May 1999 00:00
41 lines
2195 bytes
2195 bytes
>>>>> "AG" == Andrew Gierth <andrew@erlenstar.demon.co.uk> writes:
AG> +
AG> + switch (RCpathmismatch(cp, hops[0]))
AG> + {
AG> + case 0:
AG> + /* all kosher. */
AG> + Data.PathExtraLength = 0;
AG> + break;
AG> +
AG> + case 1:
AG> + {
AG> + /* expected a match; got none. Complain (but only once per connect) */
AG> + char *adr = inet_ntoa(cp->Address);
AG> + if (!cp->Mismatches++)
AG> + syslog(L_NOTICE, "path mismatch from %s (claimed to be %s)", adr, hops[0]);
AG> + sprintf(Data.PathExtra, "%s.MISMATCH!", adr);
AG> + Data.PathExtraLength = strlen(Data.PathExtra);
AG> + break;
AG> + }
AG> +
AG> + default:
AG> + /* didn't expect a match, so add a plain IP address. */
AG> + sprintf(Data.PathExtra, "%s!", inet_ntoa(cp->Address));
AG> + Data.PathExtraLength = strlen(Data.PathExtra);
AG> + break;
AG> + }
AG> +
It turns out that I had put this block of code too soon; posts with
duplicate Path headers (which are rejected of course) tend to cause
spurious 'path mismatch' warnings. I've moved it down to just before
the Perl filter now.
Incidentally, the handling of Path headers in INN seems to be getting
very crufty (and this patch of course doesn't improve that).
--
Andrew.
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