summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--dhcpv6/ztpv6/README.md1
-rw-r--r--dhcpv6/ztpv6/parse_vendor_options.go7
2 files changed, 2 insertions, 6 deletions
diff --git a/dhcpv6/ztpv6/README.md b/dhcpv6/ztpv6/README.md
index f44191b..a3e16f8 100644
--- a/dhcpv6/ztpv6/README.md
+++ b/dhcpv6/ztpv6/README.md
@@ -3,6 +3,7 @@
## Currently Supported Vendors For DHCPv6 ZTP
- Arista
- ZPE
+ - Ciena
## Why Do We Need This?
Many network hardware vendors support features that allow network devices to provision themselves with proper supporting automation/tools. Network devices can rely on DHCP and other methods to gather bootfile info, IPs, etc. DHCPv6 Vendor options provides us Vendor Name, Make, Model, and Serial Number data. This data can be used to uniquely identify individual network devices at provisioning time and can be used by tooling to make decisions necessary to correctly and reliably provision a network device.
diff --git a/dhcpv6/ztpv6/parse_vendor_options.go b/dhcpv6/ztpv6/parse_vendor_options.go
index 13983f4..3d1fd01 100644
--- a/dhcpv6/ztpv6/parse_vendor_options.go
+++ b/dhcpv6/ztpv6/parse_vendor_options.go
@@ -2,7 +2,6 @@ package ztpv6
import (
"errors"
- "fmt"
"strconv"
"strings"
@@ -81,11 +80,7 @@ func ParseVendorData(packet dhcpv6.DHCPv6) (*VendorData, error) {
if len(v) < 3 {
return nil, errVendorOptionMalformed
}
- innerMessage, err := packet.GetInnerMessage()
- if err != nil {
- return nil, fmt.Errorf("Unable to get inner message: %v", err)
- }
- duid := innerMessage.Options.ClientID()
+ duid := packet.(*dhcpv6.Message).Options.ClientID()
vd.VendorName = iana.EnterpriseIDCienaCorporation.String()
vd.Model = v[1] + "-" + v[2]
vd.Serial = string(duid.EnterpriseIdentifier)