Bug in STABLE innfeed

"Miquel van Smoorenburg" list-inn-workers at news.cistron.nl
Wed May 14 12:08:02 UTC 2008


In article <3173F5A8D2FC43EBB5B41C8C79861FF8 at Iulius>,
Julien ÉLIE  <julien at trigofacile.com> wrote:
>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.

It's standard getaddrinfo() behaviour. It returns the same address
three times .. a small test program that prints the return
values of getaddrinfo shows:

$ ./getaddrinfo feeder.erje.net
family: 2, socktype: 1, protocol: 6
family: 2, socktype: 2, protocol: 17
family: 2, socktype: 3, protocol: 0

(that's protocol TCP, UDP, and IP)

If we add

	hints.ai_socktype = SOCK_STREAM;

to the code where the hints struct is filled, then the result is:

$ ./getaddrinfo feeder.erje.net
family: 2, socktype: 1, protocol: 6

That bug must always have been there (when compiling for IPv6).

This isn't really a big problem, things won't break. It just means
that rotating the peer IP addressses is a bit slower than it could be.

For 2.4.4 this should fix it I think:

#---------------- innfeed-host-thrice-fix.diff ---------------

diff -ruN inn-2.4.4.orig/innfeed/host.c inn-2.4.4/innfeed/host.c
--- inn-2.4.4.orig/innfeed/host.c	2008-05-05 12:18:36.000000000 +0200
+++ inn-2.4.4/innfeed/host.c	2008-05-14 14:06:18.000000000 +0200
@@ -1158,6 +1158,7 @@
 
       memset(&hints, 0, sizeof(hints));
       hints.ai_family = family ? family : AF_UNSPEC;
+      hints.ai_socktype = SOCK_STREAM;
 #ifdef AI_ADDRCONFIG
       hints.ai_flags = AI_ADDRCONFIG;
 #endif
-- 
The From: and Reply-To: addresses are internal news2mail gateway addresses.
Reply to the list or to "Miquel van Smoorenburg" <miquels at cistron.nl>


More information about the inn-workers mailing list