net: ponies: ListenBroadcastUDP(net string, ifi *Interface) (*UDPConn, error) #6935
Labels
Comments
Hope http://godoc.org/code.google.com/p/go.net/ipv4 and http://godoc.org/code.google.com/p/go.net/ipv6 might help you. Status changed to WaitingForReply. |
Those two packages provide per-packet control to you. You can listen to ["udp4", "0.0.0.0", "67"] and deal with IP packet path by using incoming/outgoing IP interfaces. Well, a) socket is a simple tuple, b) it doesn't support multiple tuples, c) we need to specify a specific address or wildcard address for controlling socket, d) ipv4 has two broadcast addresses: limited and directed broadcast addresses, e) proposed ListenBroadcastUDP doesn't fix multiple tuple issue, also not fix multihome (packet path) issue. Hm, I'm not keen on adding ListenBroadcastUDP but I may be wrong. If you think that ListenBroadcastUDP is really useful, you can discuss at golang-dev, not here. |
File a new issue, please. FWIW, syscall bind assigns "a local protocol address" to the socket. I guess an IPv4 limited broadcast address is considered as a non-local address on almost all the platforms (except using some platform-dependent socket options such as IP_BINDANY). Also basically socket has no concept of network interface or net/link adjacency (except using some platform-dependent socket options) and also has no multiple address binding support. I guess that making your own DHCP transport stuff using wildcard (INADDR_ANY) socket or using BPF/LSF linklayer tap like ISC-DHCP would be a solution for now. Status changed to Unfortunate. |
This issue was closed.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
by krolaw:
The text was updated successfully, but these errors were encountered: