Bug in STABLE innfeed
Julien ÉLIE
julien at trigofacile.com
Tue May 13 19:35:01 UTC 2008
Hi,
I forward here a bug report.
I do not know exactly where the problem comes from (I assume it is triggered
off by some changes for bindaddress/bindaddress6 -- revision 7778).
Note that CURRENT works fine (only one IP is printed).
STABLE has the problem but innfeed still does its job correctly.
Julien
----- Message d'origine -----
De : "D. Stussy" <spam at bde-arc.ampr.org>
Groupes de discussion : news.software.nntp
Envoyé : mardi 13 mai 2008 02:52
Objet : Another bug - was Re: Possible Innfeed bug - Destination has unspecified address.
> "D. Stussy" <spam at bde-arc.ampr.org> wrote in message
> news:fvt1bf$qug$1 at snarked.org...
>> One of my peers has had a change in its DNS address record and is now
>> publishing "0.0.0.0" (the unspecified address) as its address. ...
>
> In looking at this further and while debugging a local patch to avoid the
> above problem, I noticed something else strange. First, a simple patch:
>
> diff -ur inn-STABLE-20080229/innfeed/host.c inn-Modified/innfeed/host.c
> --- inn-STABLE-20080229/innfeed/host.c 2008-02-29 10:08:19.000000000 +0000
> +++ inn-Modified/innfeed/host.c 2008-05-12 20:24:25.000000000 +0000
> @@ -3298,6 +3322,20 @@
>
> fputc ('\n',fp) ;
>
> + if (host->ipAddrs) {
> + int i;
> + char *family;
> +
> + for(i=0; host->ipAddrs[i] != NULL; ++i) {
> + switch(host->ipAddrs[i]->sa_family) {
> + case AF_INET: family="IPv4"; break;
> + case AF_INET6: family="IPv6"; break;
> + default: family="????"; break;
> + }
> + fprintf(fp,"IP Addr %-2u: %-4.4s %s\n", i+1, family,
> sprint_sockaddr(host->ipAddrs[i]));
> + }
> + }
> +
> fprintf (fp, " seconds: %-7ld art. timeout: %-5d ip name:
> %s\n",
> host->firstConnectTime > 0 ? (long)(now - host->firstConnectTime)
> : 0,
> host->params->articleTimeout, host->params->ipName) ;
> --- End of patch
>
> As one might guess, this patch causes innfeed to print the IP addresses
> (IPv4 and IPv6) that it has internally stored for a peer. It prints one
> line as expected for the stable version released 02/29/2008 (the version I
> had on hand), but when I apply it to today's version (Stable 05/12/2008), I
> was rather surprised: Each address seems to be duplicated in the "ipAddrs"
> array 3 times. That is just strange. This is the only patch applied to
> today's version - a fresh copy.
>
> Why is each IP address stored 3 times in the array? Where multiple
> addresses exist, all copies of the same address were consecutive.
>
> Example:
> ------------------------------------------------------------------
> feeder.erje.net
> Addr 1 : IPv6 2001:470:992a::1
> Addr 2 : IPv6 2001:470:992a::1
> Addr 3 : IPv6 2001:470:992a::1
> Addr 4 : IPv4 88.198.5.53
> Addr 5 : IPv4 88.198.5.53
> Addr 6 : IPv4 88.198.5.53
> seconds: 746 art. timeout: 600 ip name:
> snarked-in.feeder.erje.net
> ...
> ------------------------------------------------------------------
> With the "i" index incrementing, it's not some stupid error inside the loop.
>
> PS: What's with all the "%d"'s for values which are obviously UNSIGNED or
> non-negative only. Why not "%u" for those values?
More information about the inn-workers
mailing list