summaryrefslogtreecommitdiffhomepage
path: root/dhcpv4
diff options
context:
space:
mode:
authorBrian Kemper <bkemper@gmail.com>2023-03-30 11:45:33 -0600
committerBrian Kemper <bkemper@gmail.com>2023-04-13 10:38:02 -0600
commit4ec57e88f4b754ab1680a52ca86808bc271a0671 (patch)
treeb50258ba7e0877b69edb5ab008a3644b7635b89e /dhcpv4
parent974c6f05fe164b3e946d5f333bdb33459f2291af (diff)
Remove mdlayher/raw dep
Signed-off-by: Brian Kemper <bkemper@gmail.com>
Diffstat (limited to 'dhcpv4')
-rw-r--r--dhcpv4/nclient4/conn_unix.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/dhcpv4/nclient4/conn_unix.go b/dhcpv4/nclient4/conn_unix.go
index bece752..6442e70 100644
--- a/dhcpv4/nclient4/conn_unix.go
+++ b/dhcpv4/nclient4/conn_unix.go
@@ -14,7 +14,7 @@ import (
"net"
"github.com/mdlayher/ethernet"
- "github.com/mdlayher/raw"
+ "github.com/mdlayher/packet"
"github.com/u-root/uio/uio"
)
@@ -39,7 +39,7 @@ func NewRawUDPConn(iface string, port int) (net.PacketConn, error) {
if err != nil {
return nil, err
}
- rawConn, err := raw.ListenPacket(ifc, uint16(ethernet.EtherTypeIPv4), &raw.Config{LinuxSockDGRAM: true})
+ rawConn, err := packet.Listen(ifc, packet.Datagram, int(ethernet.EtherTypeIPv4), nil)
if err != nil {
return nil, err
}
@@ -155,5 +155,5 @@ func (upc *BroadcastRawUDPConn) WriteTo(b []byte, addr net.Addr) (int, error) {
packet := udp4pkt(b, udpAddr, upc.boundAddr)
// Broadcasting is not always right, but hell, what the ARP do I know.
- return upc.PacketConn.WriteTo(packet, &raw.Addr{HardwareAddr: BroadcastMac})
+ return upc.PacketConn.WriteTo(packet, &packet.Addr{HardwareAddr: BroadcastMac})
}