diff options
author | Mikael Magnusson <mikma@users.sourceforge.net> | 2023-02-24 21:19:31 +0100 |
---|---|---|
committer | Mikael Magnusson <mikma@users.sourceforge.net> | 2023-02-24 21:19:31 +0100 |
commit | 11ed3d7f07914ab48b086974fc77d5ae720f1496 (patch) | |
tree | 4e232805a43799662eab0779a8d0122f72386cd8 | |
parent | 028dbb7e8fa08d7f671dc0c48be2908e93ecb9d7 (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, } |