Python's socket.gethostbyaddr() return empty aliaslist on linux
I've tried with Python2 and Python3 on both Windows and Linux. It works in windows but not on Linux (both Ubuntu and RedHat) using the same IP to resolve of course. I also did a wireshark capture on both system and we clearly see the DNS answer containing all aliases.
import socket
print(socket.gethostbyaddr('192.168.11.1'))
On windows I get an answer like so which is OK:
('test123.com', ['alias1.test123.com', 'alias2.test123.com'], ['192.168.11.1'])
On linux I get :
('alias1.test123.com', [], ['192.168.11.1'])
Anybody knows the fix?