-
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
net: File{Conn,PacketConn} cannot accept AF_NETLINK, AF_ROUTE or other sockets #10565
Comments
CL https://golang.org/cl/9275 mentions this issue. |
@mikioh I miss |
It's intentional. I don't see any good use cases for SocketListener. |
I was literally just looking for this functionality. I got excited when I saw it was merged, but bummed out when I saw it was reverted. @mikioh , do you have another solution in mind for Go 1.6 or later? I'd be very curious to hear about it. |
This issue is re-opened as per request on #11492. |
Any word on a fix for this in Go 1.6? I remember hearing something about a syscall registration mechanism or similar to get at the runtime network poller. |
Hi @rsc and @mikioh , sorry to bother you again, but has any headway been made on this issue? From #11492:
This would be great, but I haven't found any changelists mentioning anything like it. Any news? Thanks for your time. |
No, sorry. We've been busy with other work. We aren't going to get to this for Go 1.6. |
I did a bit of playing around this morning and was able to come up with a function My understanding is that package I was able to use it to successfully send ARP requests using a modified copy of my https://github.com/mdlayher/raw package which registers link-layer sockets using this mechanism. I'd like to send a proposal later today, and if the idea is sound, clean it up, test it, and submit changelists to try to make this work. If this is able to go in, I'd be able to contribute |
It's also worth mentioning that I personally think the mechanism introduced in https://go-review.googlesource.com/#/c/9275/ is cleaner, but as long as I can get access to the runtime network poller, I'm okay with whatever option the Go team would like to pursue. |
@mikioh Any chance you have more ideas on how to tackle this in 1.10? Will the new |
Perhaps just three steps like the following:
|
For example, attached fails with "file file+net netlink: protocol not supported." When we want to know some status of network, routing information updates like "interface is going down", talking to a kernel by using netlink/route sockets is a only way to achieve it, and for handling chatty, sometimes massive events from/to the kernel we need support of runtime-integrated network poller.
The text was updated successfully, but these errors were encountered: