diff options
author | Mikael Magnusson <mikma@users.sourceforge.net> | 2023-02-24 21:19:31 +0100 |
---|---|---|
committer | Mikael Magnusson <mikma@users.sourceforge.net> | 2023-03-23 22:55:18 +0100 |
commit | 2220e2c5feadd55fde0f8ebde822657a866af792 (patch) | |
tree | 763800af959a9b7275a0aaeafb78299f4d6e8223 | |
parent | 7456234f7b4c630580625d2288267d0df06d56d9 (diff) |
WIP: Adapt to DUID changes
-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, } |