-
Notifications
You must be signed in to change notification settings - Fork 17.8k
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
x/sys: cannot create AF_UNSPEC sockaddr #64006
Labels
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
Comments
msteinert
changed the title
x/sys: Cannot create AF_UNSPEC sockaddr
x/sys: Can not create AF_UNSPEC sockaddr
Nov 8, 2023
cc @golang/runtime |
heschi
added
the
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
label
Nov 8, 2023
msteinert
added a commit
to msteinert/sys
that referenced
this issue
Nov 11, 2023
This commit adds a SockaddrUnspec type on all UNIX platforms. This socket type can be used to reset the socket's peer address as specified by POSIX: https://pubs.opengroup.org/onlinepubs/9699919799/functions/connect.html Fixes: golang/go#64006
msteinert
added a commit
to msteinert/sys
that referenced
this issue
Nov 11, 2023
This commit adds a SockaddrUnspec type on all UNIX platforms. This socket type can be used to reset the socket's peer address as specified by POSIX: https://pubs.opengroup.org/onlinepubs/9699919799/functions/connect.html Fixes: golang/go#64006
msteinert
added a commit
to msteinert/sys
that referenced
this issue
Nov 11, 2023
This commit adds a SockaddrUnspec type on all UNIX platforms. This socket type can be used to reset the socket's peer address as specified by POSIX: https://pubs.opengroup.org/onlinepubs/9699919799/functions/connect.html Fixes: golang/go#64006
msteinert
added a commit
to msteinert/sys
that referenced
this issue
Nov 17, 2023
This commit adds a SockaddrUnspec type on all UNIX platforms. This socket type can be used to reset the socket's peer address as specified by POSIX: https://pubs.opengroup.org/onlinepubs/9699919799/functions/connect.html Fixes: golang/go#64006
msteinert
added a commit
to msteinert/sys
that referenced
this issue
Jan 5, 2024
This commit adds a SockaddrUnspec type on all UNIX platforms. This socket type can be used to reset the socket's peer address as specified by POSIX: https://pubs.opengroup.org/onlinepubs/9699919799/functions/connect.html Fixes: golang/go#64006
seankhliao
changed the title
x/sys: Can not create AF_UNSPEC sockaddr
x/sys: cannot create AF_UNSPEC sockaddr
Jan 13, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
I would like to reset/disconnect a socket connection. The specification for connect says:
What did you expect to see?
A way to call
unix.Connect
with a socket address that has the family set toAF_UNSPEC
.For example, a
SockaddrUnspec
type:I tested the above patch with the following function:
The connect manpage on MacOS also mentions that passing a
NULL
address achieves the same effect. When I passed anil
address tounix.Connect
I got a segmentation fault.I realize this patch is probably not formatted correctly. It looks like the struct size and the
sockaddr()
interface function should be generated per-platform basis. I submitted a bug/question here to see if there is another way to do it or if something like the above patch might be accepted (if I figure out how to do it correctly).What did you see instead?
No way to pass an
AF_UNSPEC
address tounix.Connect
.The text was updated successfully, but these errors were encountered: