diff options
Diffstat (limited to 'dhcpv4/client.go')
-rw-r--r-- | dhcpv4/client.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/dhcpv4/client.go b/dhcpv4/client.go index 9fd8501..8a44338 100644 --- a/dhcpv4/client.go +++ b/dhcpv4/client.go @@ -137,10 +137,14 @@ func (c *Client) Exchange(ifname string, discover *DHCPv4, modifiers ...Modifier if err != nil { return conversation, err } + iface, err := net.InterfaceByName(ifname) + if err != nil { + return conversation, err + } // Discover if discover == nil { - discover, err = NewDiscoveryForInterface(ifname) + discover, err = NewDiscovery(iface.HardwareAddr) if err != nil { return conversation, err } |