summaryrefslogtreecommitdiffhomepage
path: root/dhcpv6/option_vendor_opts.go
diff options
context:
space:
mode:
authorChristopher Koch <c@chrisko.ch>2019-01-20 04:05:36 +0000
committerinsomniac <insomniacslk@users.noreply.github.com>2019-01-26 23:34:26 +0000
commit8936b6e4e714e0b682e37fa81fde29606e58e7c2 (patch)
tree25aa6c19674258c391654e52af3dc7db1ba12f7b /dhcpv6/option_vendor_opts.go
parent6a9ec900f656439652b2f20e34b2452d561eb0a6 (diff)
dhcpv6: introduce options type.
Diffstat (limited to 'dhcpv6/option_vendor_opts.go')
-rw-r--r--dhcpv6/option_vendor_opts.go6
1 files changed, 2 insertions, 4 deletions
diff --git a/dhcpv6/option_vendor_opts.go b/dhcpv6/option_vendor_opts.go
index de35141..f791ddf 100644
--- a/dhcpv6/option_vendor_opts.go
+++ b/dhcpv6/option_vendor_opts.go
@@ -36,7 +36,7 @@ import (
// OptVendorOpts represents a DHCPv6 Status Code option
type OptVendorOpts struct {
EnterpriseNumber uint32
- VendorOpts []Option
+ VendorOpts Options
}
// Code returns the option code
@@ -81,9 +81,7 @@ func ParseOptVendorOpts(data []byte) (*OptVendorOpts, error) {
}
opt.EnterpriseNumber = binary.BigEndian.Uint32(data[:4])
- var err error
- opt.VendorOpts, err = OptionsFromBytesWithParser(data[4:], vendParseOption)
- if err != nil {
+ if err := opt.VendorOpts.FromBytesWithParser(data[4:], vendParseOption); err != nil {
return nil, err
}
return &opt, nil