From 57e9968838278e198d2f7cb5964eac098a4c32bd Mon Sep 17 00:00:00 2001 From: Pablo Mazzini Date: Fri, 9 Nov 2018 13:04:03 +0000 Subject: return nil vendor data --- dhcpv4/ztp/ztp.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'dhcpv4/ztp/ztp.go') diff --git a/dhcpv4/ztp/ztp.go b/dhcpv4/ztp/ztp.go index 779af46..3d19bc3 100644 --- a/dhcpv4/ztp/ztp.go +++ b/dhcpv4/ztp/ztp.go @@ -33,7 +33,7 @@ func parseV4VendorClass(packet *dhcpv4.DHCPv4) (*VendorData, error) { opt := packet.GetOneOption(dhcpv4.OptionClassIdentifier) if opt == nil { - return vd, nil + return nil, nil } vc := opt.(*dhcpv4.OptClassIdentifier).Identifier @@ -87,6 +87,6 @@ func parseV4VendorClass(packet *dhcpv4.DHCPv4) (*VendorData, error) { return vd, nil } - // We didn't match anything, just return an empty vendor data. - return vd, nil + // We didn't match anything. + return nil, nil } -- cgit v1.2.3