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

stream_socket_get_name() can return ipv6 address even when ipv6 is not available #16117

Open
nielsdos opened this issue Sep 29, 2024 · 1 comment

Comments

@nielsdos
Copy link
Member

Description

See #16115 (comment)

PHP Version

PHP 8.4, perhaps lower too

Operating System

Linux

@NattyNarwhal
Copy link
Member

I chased the code path since I was looking at PHP network stuff a bit ago, and it (through a ton of indirection) basically just does getsockname then calls inet_ntop on it based on the returned sockaddr's address family. There's not much additional smarts in that code path other than getting the underlying socket fd for the stream. I'm feeling this might be DNS. Probably, it resolves localhost as ::1 and tries making the socket and connecting to that, even if (for some reason) it can't.

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

No branches or pull requests

3 participants