This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ronaldoussoren
Recipients asvetlov, kyuupichan, ronaldoussoren, twisteroid ambassador, yselivanov
Date 2018-12-19.16:12:53
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <[email protected]>
In-reply-to
Content
A better workaround is IMHO to force the socket to be IPV6 only:

sd = socket.socket(socket.AF_INET6, socket.SOCK_STREAM, 0)
sd.setsockopt(socket.IPPROTO_IPV6, socket.IPV6_V6ONLY, 1)

That avoids the ordering problem as well as having to try all possible combinations of source and destination addreses.

I've tested that setting this option makes it impossible to bind a IPv6 socket to an IPv4 address.  This is on macOS 10.14.2, I haven't checked other versions of macOS.
History
Date User Action Args
2018-12-19 16:12:53ronaldoussorensetrecipients: + ronaldoussoren, asvetlov, yselivanov, kyuupichan, twisteroid ambassador
2018-12-19 16:12:53ronaldoussorensetmessageid: <[email protected]>
2018-12-19 16:12:53ronaldoussorenlinkissue35302 messages
2018-12-19 16:12:53ronaldoussorencreate