[rbldnsd] Disabling ipv6-specific tests
Michael Tokarev
mjt at tls.msk.ru
Wed Jul 31 10:31:43 MSK 2013
30.07.2013 23:27, Jeff Dairiki wrote:
> On Mon, Jul 29, 2013 at 08:52:29PM -0400, Michael Orlitzky wrote:
[]
>
> The test is testing something that should work. It's the
> implementation of the test that is causing the trouble. I don't want
> to skip it just because the test itself is broken on a particular
> architecture. (That mostly negates the point of the test.)
>
> I'll work on finding a not-too-ugly alternative to inet_pton.
Heh. We do have working implementation of a similar function in rbldnsd
itself. Ofcourse it'd be more interesting to test it against system
implementation, but if it does not exist.... ;)
>>> What does 'host localhost' produce on this system?
>>
>> $ host localhost
>> localhost has address 127.0.0.1
>> localhost has IPv6 address ::1
>>
>>
>>> How about (quick-and-dirty way to see what the gethostbyname() libc
>>> function returns):
>>>
>>> python -c "import socket; print socket.gethostbyname_ex('localhost')"
>>
>> $ python -c "import socket; print socket.gethostbyname_ex('localhost')"
>> ('localhost', [], ['127.0.0.1', '127.0.0.1'])
>
> Wierd, but there's the problem.
>
> Gethostbyname() returns 127.0.0.1 twice. This causes initsockets() to
> attempt to open two listening sockets on 127.0.0.1. The second call
> to newsocket() fails with "address in use", because the address is
> indeed in use by the socket opened by the first call to newsocket().
>
> I guess this problem only crops up on systems where the kernel/libc
> support ipv6, but ipv6 is explicitly disabled during the compilation of
> rbldnsd.
>
> Two possible fixes:
I don't think this needs fixing at all, just leave it at it is. It is
the first complaint in many years about this problem, and it is trivially
fixable by using 127.0.0.1 instead of localhost, if needed. Especially
if the original issue is an old bug elsewhere which has been fixed long
ago ;)
Thanks,
/mjt
More information about the rbldnsd
mailing list