summaryrefslogtreecommitdiffhomepage
path: root/dhcpv4/nclient4
diff options
context:
space:
mode:
Diffstat (limited to 'dhcpv4/nclient4')
-rw-r--r--dhcpv4/nclient4/conn_linux.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/dhcpv4/nclient4/conn_linux.go b/dhcpv4/nclient4/conn_linux.go
index d6edc38..af6485f 100644
--- a/dhcpv4/nclient4/conn_linux.go
+++ b/dhcpv4/nclient4/conn_linux.go
@@ -140,14 +140,14 @@ func (upc *BroadcastRawUDPConn) ReadFrom(b []byte) (int, net.Addr, error) {
udpHdr := UDP(buf.Consume(udpHdrLen))
addr := &net.UDPAddr{
- IP: net.IP(ipHdr.DestinationAddress()),
+ IP: ipHdr.DestinationAddress(),
Port: int(udpHdr.DestinationPort()),
}
if !udpMatch(addr, upc.boundAddr) {
continue
}
srcAddr := &net.UDPAddr{
- IP: net.IP(ipHdr.SourceAddress()),
+ IP: ipHdr.SourceAddress(),
Port: int(udpHdr.SourcePort()),
}
// Extra padding after end of IP packet should be ignored,