🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #80913

Re: Outgoing feed filter

#80913
From: Geoff Brozny
Date: Wed, 06 May 2009 13:42
98 lines
4380 bytes
"Julien ÉLIE" <iulius@nom-de-mon-site.com.invalid> wrote in message 
news:gtq951$7gp$1@news.trigofacile.com...

>
> The problem is that at some point during the function which determines 
> what
> sites will receive the articles, funnels are removed in favour of what 
> they
> point at (like innfeed!).  Therefore, if "news.server.org" has the Af 
> flag,
> this flag is not transmitted to "innfeed!" (because it handles more than 
> one
> site).  And when it is time to send the article, "news.server.org" is no 
> longer
> known and the article ends up being transmitted to "innfeed!" which sends 
> it
> to "news.server.org".
>
> I fixed the code to check for the Af flag on funnels too.
>
>
> Here is a patch:
>
> Index: innd/art.c
> ===================================================================
> --- innd/art.c       (révision 8438)
> +++ innd/art.c       (copie de travail)
> @@ -1685,7 +1685,7 @@
> */
> static void
> ARTpropagate(ARTDATA *data, const char **hops, int hopcount, char **list,
> -  bool ControlStore, bool OverviewCreated)
> +  bool ControlStore, bool OverviewCreated, bool Filtered)
> {
>   HDRCONTENT   *hc = data->HdrContent;
>   SITE         *sp, *funnel;
> @@ -1775,6 +1775,10 @@
>        continue;
>     }
>
> +    /* Handle dontrejectfiltered. */
> +    if (Filtered && sp->DropFiltered)
> +      continue;
> +
>     /* Write that the site is getting it, and flag to send it. */
>     if (innconf->logsitename) {
>       if (fprintf(Log, " %s", sp->Name) == EOF || ferror(Log)) {
> @@ -2540,7 +2544,7 @@
>   }
>
>   ARTpropagate(data, (const char **)hops, hopcount, 
> data->Distribution.List,
> -    ControlStore, OverviewCreated);
> +    ControlStore, OverviewCreated, Filtered);
>
>   /* Now that it's been written, process the control message.  This has
>    * a small window, if we get a new article before the newgroup message
> @@ -2559,11 +2563,9 @@
>   /* And finally, send to everyone who should get it */
>   for (sp = Sites, i = nSites; --i >= 0; sp++) {
>     if (sp->Sendit) {
> -      if (!Filtered || !sp->DropFiltered) {
> -       TMRstart(TMR_SITESEND);
> -       SITEsend(sp, data);
> -       TMRstop(TMR_SITESEND);
> -      }
> +      TMRstart(TMR_SITESEND);
> +      SITEsend(sp, data);
> +      TMRstop(TMR_SITESEND);
>     }
>   }
>
>
>
>
> I hope I did not break anything.  At least, this article reached your
> news server so it was properly propagated from my news server which
> has this patch :)
>


I did a bunch of testing last night, and it has been running though the 
night with the patch and seems to be working properly. Thank you for fixing 
this, I appreciate it.

Something else that would probably be helpful, is INN is not logging 
anywhere what articles are actually being rejected by the filter with 
dontrejectfiltered set to true, this behavior could make it a bit difficult 
to troubleshoot a filter that might be to aggressive or why a specific post 
did not get offered it to a specific peer. There probably should be some 
indication when the article is received, that it was accepted, but also 
rejected by the filter.

thanks,
geoff 

Technical Details
Message-ID: <gts44k$nbm$1@posting2.glorb.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20141118.mbox.gz!border1.nntp.ams.giganews.com!nntp.giganews.com!feeder8.cambrium.nl!feed.tweaknews.nl!209.197.12.246.MISMATCH!nx02.iad01.newshosting.com!newshosting.com!69.16.185.21.MISMATCH!npeer03.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!news.glorb.com!news-spur2.glorb.com!homer.glorb.com!not-for-mail
References: <gtfajk$7q8$1@posting2.glorb.com> <gtq951$7gp$1@news.trigofacile.com>

Show Full Headers
Complete Article Headers
Message-ID: <gts44k$nbm$1@posting2.glorb.com>
Subject: Re: Outgoing feed filter
Date: Wed, 6 May 2009 09:42:40 -0400
From: "Geoff Brozny" <gbrozny@glorb.columbus.oh.us>
References: <gtfajk$7q8$1@posting2.glorb.com> <gtq951$7gp$1@news.trigofacile.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20141118.mbox.gz!border1.nntp.ams.giganews.com!nntp.giganews.com!feeder8.cambrium.nl!feed.tweaknews.nl!209.197.12.246.MISMATCH!nx02.iad01.newshosting.com!newshosting.com!69.16.185.21.MISMATCH!npeer03.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!news.glorb.com!news-spur2.glorb.com!homer.glorb.com!not-for-mail
Newsgroups: news.software.nntp
Organization: Glorb Internet Services, http://www.glorb.com
Lines: 98
NNTP-Posting-Host: NWNy2NLIL+X5ebGzRqqvpw.user.posting2.glorb.com
X-Complaints-To: abuse@glorb.com
NNTP-Posting-Date: Wed, 6 May 2009 13:42:44 +0000 (UTC)
X-Notice: Scanned by Mr. Bill
X-Newsreader: Microsoft Outlook Express 6.00.2900.5512