summaryrefslogtreecommitdiffhomepage
path: root/dhcpv4/ztp
diff options
context:
space:
mode:
authorPablo Mazzini <pmazzini@gmail.com>2018-11-09 13:36:57 +0000
committerPablo Mazzini <pmazzini@gmail.com>2018-11-09 13:36:57 +0000
commit35e51993410f653ef8ec1052772851f5f7151cab (patch)
tree07bea53d9aff933cb38fde15482ffbc054f1a56d /dhcpv4/ztp
parent97ac7895b423edbaa1944062542ea9f76faa7f06 (diff)
update comments
Diffstat (limited to 'dhcpv4/ztp')
-rw-r--r--dhcpv4/ztp/ztp.go6
1 files changed, 2 insertions, 4 deletions
diff --git a/dhcpv4/ztp/ztp.go b/dhcpv4/ztp/ztp.go
index ecd6469..b96c8ae 100644
--- a/dhcpv4/ztp/ztp.go
+++ b/dhcpv4/ztp/ztp.go
@@ -8,8 +8,7 @@ import (
)
// VendorData is optional data a particular vendor may or may not include
-// in the Vendor Class options. All values are optional and will be zero
-// values if not found.
+// in the Vendor Class options.
type VendorData struct {
VendorName string
Model string
@@ -29,13 +28,12 @@ func ParseVendorData(packet *dhcpv4.DHCPv4) (*VendorData, error) {
// for the vendor, usually using a delimitator to separate the values.
// See: https://tools.ietf.org/html/rfc1533#section-9.11
func parseV4VendorClass(packet *dhcpv4.DHCPv4) (*VendorData, error) {
- vd := &VendorData{}
-
opt := packet.GetOneOption(dhcpv4.OptionClassIdentifier)
if opt == nil {
return nil, nil
}
vc := opt.(*dhcpv4.OptClassIdentifier).Identifier
+ vd := &VendorData{}
switch {
// Arista;DCS-7050S-64;01.23;JPE12221671