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-30 23:17:27 +0200 |
commit | 0c433357ff731d2824753f453fd477c12ae3d40c (patch) | |
tree | 72d73d185de9fb08838ba7eba90806f77a9252a5 | |
parent | e7455b01afb5689370a1a97c6dbfc9cd0a0e9fea (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, } |