On 2019-06-01 19:15:28 +0200, Markus Elfring wrote: > >> connect(3, {sa_family=AF_INET, sin_port=htons(37351), > >> sin_addr=inet_addr("127.0.0.1")}, 16) = -1 ECONNREFUSED (Connection > >> refused) > > Without seeing the code, I'd be suspicious of that difference. > > I would expect that the IPv4 address from such a connection attempt > would be automatically converted to a IPv6 loopback address.
You haven't said which OS you are using, but as far as I know this expectation will be frustrated at least on Linux: There ::1 and 127.0.0.1 are distinct addresses. If you want to accept connections on both, you have to listen on both (or on ::, which does accept connections on all IP addresees - IPv6 and IPv4). hp -- _ | Peter J. Holzer | we build much bigger, better disasters now |_|_) | | because we have much more sophisticated | | | h...@hjp.at | management tools. __/ | http://www.hjp.at/ | -- Ross Anderson <https://www.edge.org/>
signature.asc
Description: PGP signature
-- https://mail.python.org/mailman/listinfo/python-list