From 46ce21cd90de7e082c7ef2eaefb6e499fa80fb3a Mon Sep 17 00:00:00 2001 From: insomniac Date: Fri, 27 Jul 2018 15:39:11 +0100 Subject: [DHCPv4] BroadcastSendReceive now can wait for specific reply types (#95) --- dhcpv4/bsdp/client.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'dhcpv4/bsdp/client.go') diff --git a/dhcpv4/bsdp/client.go b/dhcpv4/bsdp/client.go index 10cf6b4..3d885aa 100644 --- a/dhcpv4/bsdp/client.go +++ b/dhcpv4/bsdp/client.go @@ -60,7 +60,7 @@ func (c *Client) Exchange(ifname string, informList *dhcpv4.DHCPv4) ([]dhcpv4.DH conversation[0] = *informList // ACK[LIST] - ackForList, err := dhcpv4.BroadcastSendReceive(sendFd, recvFd, informList, c.ReadTimeout, c.WriteTimeout) + ackForList, err := dhcpv4.BroadcastSendReceive(sendFd, recvFd, informList, c.ReadTimeout, c.WriteTimeout, dhcpv4.MessageTypeAck) if err != nil { return conversation, err } @@ -86,7 +86,7 @@ func (c *Client) Exchange(ifname string, informList *dhcpv4.DHCPv4) ([]dhcpv4.DH conversation = append(conversation, *informSelect) // ACK[SELECT] - ackForSelect, err := dhcpv4.BroadcastSendReceive(sendFd, recvFd, informSelect, c.ReadTimeout, c.WriteTimeout) + ackForSelect, err := dhcpv4.BroadcastSendReceive(sendFd, recvFd, informSelect, c.ReadTimeout, c.WriteTimeout, dhcpv4.MessageTypeAck) castVendorOpt(ackForSelect) if err != nil { return conversation, err -- cgit v1.2.3