summaryrefslogtreecommitdiffhomepage
path: root/dhcpv4/client.go
diff options
context:
space:
mode:
Diffstat (limited to 'dhcpv4/client.go')
-rw-r--r--dhcpv4/client.go10
1 files changed, 1 insertions, 9 deletions
diff --git a/dhcpv4/client.go b/dhcpv4/client.go
index cc3a13f..145a7ef 100644
--- a/dhcpv4/client.go
+++ b/dhcpv4/client.go
@@ -55,15 +55,7 @@ func (c *Client) Exchange(ifname string, d *DHCPv4) ([]DHCPv4, error) {
// Discovery
if d == nil {
- d, err = NewDiscovery()
- if err != nil {
- return conversation, err
- }
- iface, err := net.InterfaceByName(ifname)
- if err != nil {
- return conversation, err
- }
- d.SetClientHwAddr(iface.HardwareAddr)
+ d, err = NewDiscoveryForInterface(ifname)
}
conversation[0] = *d