From 35e51993410f653ef8ec1052772851f5f7151cab Mon Sep 17 00:00:00 2001 From: Pablo Mazzini Date: Fri, 9 Nov 2018 13:36:57 +0000 Subject: update comments --- dhcpv4/ztp/ztp.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'dhcpv4/ztp') 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 -- cgit v1.2.3