daemon_controller icon indicating copy to clipboard operation
daemon_controller copied to clipboard

ping_command doesn't work with 'localhost' on 64 Bit linux

Open eddikonfetti opened this issue 8 years ago • 0 comments

Giving 'localhost' as host for the ping_command leads to endles ping on a 64 Bit CentOS 7 linux because the internal representation of the sock_addr seems to be incorrect (a lot of zeros and a 1):

CentOS7 (64 Bit)/ruby/2.0/x86_64 gems: sockaddr = "\n\x00+g\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00"

On 32 Bit CentOS 5 it is correct (representation shows 127.0.0.1 in hex):

CentOS5 (32 Bit)/ruby/2.0/i686 gems: sockaddr = "\x02\x00+g\x7F\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00"

Changing the string 'localhost' to '127.0.0.1' works on both architectures.

eddikonfetti avatar Nov 21 '17 15:11 eddikonfetti