summaryrefslogtreecommitdiffhomepage
path: root/dhcpv6/ztpv6/parse_vendor_options_test.go
diff options
context:
space:
mode:
authorChris Koch <chrisko@google.com>2023-02-18 23:55:40 -0800
committerChris K <c@chrisko.ch>2023-02-19 13:39:52 -0800
commit93dbaf95ae931da311e1671fd0f470f2aa5f6980 (patch)
tree9e316e50ebcece3b96f0c4261c63d32af8fa2c32 /dhcpv6/ztpv6/parse_vendor_options_test.go
parentf51b4d4530334a45ccb40368ada7930d269ef44a (diff)
dhcpv6: proper DUID types
Signed-off-by: Chris Koch <chrisko@google.com>
Diffstat (limited to 'dhcpv6/ztpv6/parse_vendor_options_test.go')
-rw-r--r--dhcpv6/ztpv6/parse_vendor_options_test.go7
1 files changed, 3 insertions, 4 deletions
diff --git a/dhcpv6/ztpv6/parse_vendor_options_test.go b/dhcpv6/ztpv6/parse_vendor_options_test.go
index 03ff8cf..cfbfdde 100644
--- a/dhcpv6/ztpv6/parse_vendor_options_test.go
+++ b/dhcpv6/ztpv6/parse_vendor_options_test.go
@@ -64,7 +64,7 @@ func TestParseVendorDataWithVendorClass(t *testing.T) {
tt := []struct {
name string
vc string
- clientId *dhcpv6.Duid
+ clientId dhcpv6.DUID
want *VendorData
fail bool
}{
@@ -84,8 +84,7 @@ func TestParseVendorDataWithVendorClass(t *testing.T) {
{
name: "Ciena",
vc: "1271-23422Z11-123",
- clientId: &dhcpv6.Duid{
- Type: dhcpv6.DUID_EN,
+ clientId: &dhcpv6.DUIDEN{
EnterpriseIdentifier: []byte("001234567"),
},
want: &VendorData{VendorName: iana.EnterpriseIDCienaCorporation.String(), Model: "23422Z11-123", Serial: "001234567"},
@@ -102,7 +101,7 @@ func TestParseVendorDataWithVendorClass(t *testing.T) {
packet.AddOption(&dhcpv6.OptVendorClass{
EnterpriseNumber: 0000, Data: [][]byte{[]byte(tc.vc)}})
if tc.clientId != nil {
- packet.AddOption(dhcpv6.OptClientID(*tc.clientId))
+ packet.AddOption(dhcpv6.OptClientID(tc.clientId))
}
vd, err := ParseVendorData(packet)
if err != nil && !tc.fail {