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

Use struct sockaddr_storage #38

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

steelman
Copy link

@steelman steelman commented Jan 5, 2021

Use struct sockaddr_storage instead of struct sockaddr in listen(),
accept() and accept4(). struct sockaddr is to small to hold result of
getsockname() for AF_INET6 sockets. Therefore,
utils_sockaddr_is_localhost() can never be true for AF_INET6 sockets.

Use struct sockaddr_storage instead of struct sockaddr in listen(),
accept() and accept4(). struct sockaddr is to small to hold result of
getsockname() for AF_INET6 sockets. Therefore,
utils_sockaddr_is_localhost() can never be true for AF_INET6 sockets.
@petterreinholdtsen
Copy link

I ran into this problem too, and it took me quite a long time to figure out the workaround was to specify 127.0.0.1 instead of expecting the default 'localhost' to work

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