Re: getfqdn passes a hostname to gethostbyaddr instead of an ip address

2018-09-12 Thread Thomas Jollans
On 12/09/18 16:29, Florian Bergmann wrote: On the other hand I feel given the documentation, passing the `ip_address` would be the right thing to do, so I am wondering if I am missing something very obvious here (especially given that the code seems to be unchanged for 18 years). Whatever the do

Re: getfqdn passes a hostname to gethostbyaddr instead of an ip address

2018-09-12 Thread Rhodri James
On 12/09/18 15:29, Florian Bergmann wrote: Hello, While I was debugging some salt issues I dug into the python code and found a piece of code in the `socket.py` module that surprised my a bit: In the `getfqdn` function the `gethostbyaddr` name function is being called with a `hostname` instead

getfqdn passes a hostname to gethostbyaddr instead of an ip address

2018-09-12 Thread Florian Bergmann
Hello, While I was debugging some salt issues I dug into the python code and found a piece of code in the `socket.py` module that surprised my a bit: In the `getfqdn` function the `gethostbyaddr` name function is being called with a `hostname` instead of an `ipaddress`: ```python def getfqdn(nam