On Mon, 4 Oct 2010 14:31:21 +0200
Jacek Zapala <ja...@it.pl> wrote:

> Hi.
> 
> Starting from the last upgrade (0.96.3 on debian) freshclam randomly
> chooses between ipv6/ipv4 connecting to the name that has addresses
> in both protocols.
> 
> freshclam uses getaddrinfo() for resolving mirror dns name
> (wwwconnect in manager.c), but then it randomizes the list returned
> as a result. This way it breaks the algorithm of ipv6 address
> selection from rfc3484 implemented in getaddrinfo().

It is not intended to mix IPv4 and IPv6. It should be possible to
randomize only IPv4 and IPv6 separately.

Is the problem that your IPv6 link is slower than IPv4, or that you
don't have an IPv6 connection at all?

> 
> What is the reason for doing this?

Because otherwise the list returned by getaddrinfo() is always in
sorted order (on Linux at least), so it would only use the first mirror.

See this:
https://wwws.clamav.net/bugzilla/show_bug.cgi?id=2021#c1

Best regards,
--Edwin
_______________________________________________
http://lurker.clamav.net/list/clamav-devel.html
Please submit your patches to our Bugzilla: http://bugs.clamav.net

Reply via email to