Skip to content

Use struct sockaddr_storage#38

Open
steelman wants to merge 1 commit intodgoulet:masterfrom
steelman:master
Open

Use struct sockaddr_storage#38
steelman wants to merge 1 commit intodgoulet:masterfrom
steelman:master

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

Development

Successfully merging this pull request may close these issues.

2 participants