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/unix: support AF_CAN in anyToSockaddr #40842
Comments
I think you'll also need to set |
CLA is signed. |
Right. My mistake, I was looking at I think we need to fill |
Add AF_CAN support to anyToSockaddr() Fixes golang/go#40842
Change https://golang.org/cl/248977 mentions this issue: |
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?
Calling e.g. unix.Recvmsg for a SocketCAN socket (AF_CAN)
Example program
First set up VCAN interface and generate data (via canutils):
What did you expect to see?
What did you see instead?
Method returns error EAFNOSUPPORT "address family not supported by protocol" and from
<nil>
.Comments
Obviously, private unix.anyToSockaddr is called by unix.Recvmsg and returns EAFNOSUPPORT as AF_CAN is not yet supported. SockaddrCAN and AF_CAN support was added via #16188 by @ianlancetaylor and @elliotmr.
Perhaps something like
in the switch statement in anyToSockaddr() would be sufficient.
The text was updated successfully, but these errors were encountered: