summaryrefslogtreecommitdiffhomepage
path: root/pkg/dhcp
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/dhcp')
-rw-r--r--pkg/dhcp/client.go4
-rw-r--r--pkg/dhcp/dhcp_test.go2
-rw-r--r--pkg/dhcp/server.go2
3 files changed, 4 insertions, 4 deletions
diff --git a/pkg/dhcp/client.go b/pkg/dhcp/client.go
index 9a4fd7ae4..37deb69ff 100644
--- a/pkg/dhcp/client.go
+++ b/pkg/dhcp/client.go
@@ -162,7 +162,7 @@ func (c *Client) Request(ctx context.Context, requestedAddr tcpip.Address) error
// DHCPOFFER
for {
var addr tcpip.FullAddress
- v, err := epin.Read(&addr)
+ v, _, err := epin.Read(&addr)
if err == tcpip.ErrWouldBlock {
select {
case <-ch:
@@ -216,7 +216,7 @@ func (c *Client) Request(ctx context.Context, requestedAddr tcpip.Address) error
// DHCPACK
for {
var addr tcpip.FullAddress
- v, err := epin.Read(&addr)
+ v, _, err := epin.Read(&addr)
if err == tcpip.ErrWouldBlock {
select {
case <-ch:
diff --git a/pkg/dhcp/dhcp_test.go b/pkg/dhcp/dhcp_test.go
index d56b93997..ed884fcb6 100644
--- a/pkg/dhcp/dhcp_test.go
+++ b/pkg/dhcp/dhcp_test.go
@@ -36,7 +36,7 @@ func TestDHCP(t *testing.T) {
}
}()
- s := stack.New([]string{ipv4.ProtocolName}, []string{udp.ProtocolName})
+ s := stack.New(&tcpip.StdClock{}, []string{ipv4.ProtocolName}, []string{udp.ProtocolName})
const nicid tcpip.NICID = 1
if err := s.CreateNIC(nicid, id); err != nil {
diff --git a/pkg/dhcp/server.go b/pkg/dhcp/server.go
index d132d90b4..8816203a8 100644
--- a/pkg/dhcp/server.go
+++ b/pkg/dhcp/server.go
@@ -104,7 +104,7 @@ func (s *Server) reader(ctx context.Context) {
for {
var addr tcpip.FullAddress
- v, err := s.ep.Read(&addr)
+ v, _, err := s.ep.Read(&addr)
if err == tcpip.ErrWouldBlock {
select {
case <-ch: