bug-wget
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-wget] HTTPS Python tests fail if localhost resolves to ::1


From: Tim Rühsen
Subject: Re: [Bug-wget] HTTPS Python tests fail if localhost resolves to ::1
Date: Tue, 6 Jun 2017 10:45:07 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0

On 06/02/2017 11:38 AM, Tomas Hozza wrote:
> Hi.
> 
> In Fedora 26+ the /etc/hosts lists "localhost" as a domain for both 127.0.0.1 
> and ::1. This makes wget's testsuite to fail during build.
> 
> Failing tests:
> Test--https.py
> Test-pinnedpubkey-der-https.py
> Test-pinnedpubkey-hash-https.py
> Test-pinnedpubkey-pem-https.py

There are systems that are
- IPv6 only
- IPv4 only
- IPv6 + IPv4

each with or without localhost entries in /etc/hosts.

On IPv6 + IPv4 systems there might be none, one or two 'localhost'
entries in /etc/hosts.

With two entries I already experienced a 'round-robin' like resolving of
'localhost'.

To achieve a stable test suite behavior, the test server should open a
listening port on all IPs of 'localhost'. We have two problems here:
1. neither the Perl nor the Python test suite server are ready to handle
more than one port, currently.
2. opening a port on *any* interface might be a security issue on some
systems.

Any idea what the best solution is here ?


Also the clients make some assumptions, some use 'localhost' to contact
the test server, some use 127.0.0.1. Both may fail under certain conditions.

The easiest solution would be when we assume that 'localhost' always
(stable) resolves to either '127.0.0.1' or '::1'. Then we could replace
hard-coded '127.0.0.1' by 'localhost'. But for the 'round-robin' or
'random' resolving scenario we have to change the test suite to open
ports for each 'localhost' IP.

Using 'localhost' instead of 127.0.0.1 in the tests should also fix
possible test certificate problems.

With Best Regards, Tim

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]