Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
eddikonfetti opened this issue Nov 21, 2017 · 0 comments
Open

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

eddikonfetti opened this issue Nov 21, 2017 · 0 comments

Comments

@eddikonfetti
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant