summaryrefslogtreecommitdiffhomepage
path: root/dhcpv4
diff options
context:
space:
mode:
authorPablo Mazzini <pmazzini@gmail.com>2018-11-09 13:04:03 +0000
committerPablo Mazzini <pmazzini@gmail.com>2018-11-09 13:04:03 +0000
commit57e9968838278e198d2f7cb5964eac098a4c32bd (patch)
treec62e6e7ac99cd65237df0a9ad79b9a638acc4b12 /dhcpv4
parent3da5b299d02f7a97e3c7ea33c249dc942bd56428 (diff)
return nil vendor data
Diffstat (limited to 'dhcpv4')
-rw-r--r--dhcpv4/ztp/ztp.go6
1 files changed, 3 insertions, 3 deletions
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
}