- /control/dhcp/find_active_dhcp: fix DHCP server detection
Before this patch we couldn't receive incoming DHCP packets. Now we bind() to 0.0.0.0 and set the required network interface using SO_BINDTODEVICE option. As an improvement, we now wait until a reply to our request is received and skip all unknown packets.
This commit is contained in:
12
dhcpd/os_windows.go
Normal file
12
dhcpd/os_windows.go
Normal file
@@ -0,0 +1,12 @@
|
||||
package dhcpd
|
||||
|
||||
import (
|
||||
"net"
|
||||
|
||||
"golang.org/x/net/ipv4"
|
||||
)
|
||||
|
||||
// Create a socket for receiving broadcast packets
|
||||
func newBroadcastPacketConn(bindAddr net.IP, port int, ifname string) (*ipv4.PacketConn, error) {
|
||||
return nil, nil
|
||||
}
|
||||
Reference in New Issue
Block a user