Message330354
I run a machine with IPv4 and IPv6 interfaces on MacOSX Mojave.
I try to loop.create_connection() to a remote machine whose domain resolves to an IPv6 address only, with a local_addr domain name argument that resolves to two local addresses: an IPv4 one first and an IPv6 one second.
The loop https://github.com/python/cpython/blob/master/Lib/asyncio/base_events.py#L927-L943 that loops through the local addresses, IPv4 then IPv6, successfully binds the IPv4 laddr_info to the IPv6 socket successfully (something I find surprising) and then the connection attempt fails with OSError(65, 'No route to host'), at which point the sockets is closed and the IPv6 laddr_info is never tried and the connection attempt fails.
If I reverse the order of the loop so that the IPv6 laddr_info is tried first then the connection succeeds.
I suggest either all laddr_info bindings should be tried for each outer loop of infos, rather than just 1, or that those of a different socket "type" (IPv4 vs IPv6) should be skipped in the inner loop before attempting a binding. |
|
Date |
User |
Action |
Args |
2018-11-23 18:30:53 | kyuupichan | set | recipients:
+ kyuupichan, asvetlov, yselivanov |
2018-11-23 18:30:53 | kyuupichan | set | messageid: <1542997853.2.0.788709270274.issue35302@psf.upfronthosting.co.za> |
2018-11-23 18:30:53 | kyuupichan | link | issue35302 messages |
2018-11-23 18:30:53 | kyuupichan | create | |
|