Tuesday 18 May 2021

Re: +1 maintenance report part 1

On Tue, May 18, 2021 at 04:35:56PM +1200, Michael Hudson-Doyle wrote:
> no_proxy but maybe we should do this always? I also don't understand how
> this works on other architectures -- if you do (python) s=socket.socket();
> s.bind(('0.0.0.0', 0)); print(s.getsockname()[0]) will you ever get an
> answer other than 0.0.0.0?

If this is the exact sequence, then I'm not sure. It seems unlikely.

However, if the actual sequence is a bit more involved, then yes, you can
get other results:

>>> import socket
>>> s=socket.socket()
>>> s.bind(('0.0.0.0', 0)); print(s.getsockname()[0])
0.0.0.0
>>> s.connect(('127.0.0.53', 53))
>>> print(s.getsockname()[0])
127.0.0.1
>>>

Thanks