diff options
Diffstat (limited to 'tunnel/tools/libwg-go')
-rw-r--r-- | tunnel/tools/libwg-go/dhcp.go | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/tunnel/tools/libwg-go/dhcp.go b/tunnel/tools/libwg-go/dhcp.go index aaeb2e38..83a8c865 100644 --- a/tunnel/tools/libwg-go/dhcp.go +++ b/tunnel/tools/libwg-go/dhcp.go @@ -27,7 +27,7 @@ type dhcp struct { peerAddr net.IP } -func newClientIDOpt(duid *dhcpv6.Duid) dhcpv4.Option { +func newClientIDOpt(duid dhcpv6.DUID) dhcpv4.Option { iaid := []byte{0, 0, 0, 3} ident := []byte{255} // Type IAID+DUID ident = append(ident, iaid...) // IAID @@ -35,10 +35,9 @@ func newClientIDOpt(duid *dhcpv6.Duid) dhcpv4.Option { return dhcpv4.OptClientIdentifier(ident) } -func getDuid(hwAddr net.HardwareAddr) dhcpv6.Duid { - duid := dhcpv6.Duid{ - Type: dhcpv6.DUID_LL, - HwType: iana.HWTypeEthernet, +func getDuid(hwAddr net.HardwareAddr) dhcpv6.DUID { + duid := &dhcpv6.DUIDLL{ + HWType: iana.HWTypeEthernet, LinkLayerAddr: hwAddr, } |