-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Socket::IPAddress.valid?
does not always work
#13191
Comments
I tried this on my machine and it returns true as well. I am running windows 11, so I guess windows 10 is the os version that doesn't work? |
It definitely failed before the CI update to Windows Server 2022, that is on Windows Server 2019. Not sure where that leaves Windows 10 because both server releases are based on that. But it is safe to assume it failed on some earlier version of the desktop OS as well. |
According to the specs in |
Socket::IPAddress.valid_v6?
does not always work on WindowsSocket::IPAddress.valid?
does not always work
The following should return
true
, but it returnsfalse
on some Windows versions:Apparently Windows Server 2022 fixed this, but it might be better to port
LibC.inet_pton
to pure Crystal. Some reference implementations: glibc, musl, bionicThe text was updated successfully, but these errors were encountered: