diff options
author | Christopher Koch <c@chrisko.ch> | 2019-01-20 04:05:36 +0000 |
---|---|---|
committer | insomniac <insomniacslk@users.noreply.github.com> | 2019-01-26 23:34:26 +0000 |
commit | 8936b6e4e714e0b682e37fa81fde29606e58e7c2 (patch) | |
tree | 25aa6c19674258c391654e52af3dc7db1ba12f7b /dhcpv6/option_vendor_opts.go | |
parent | 6a9ec900f656439652b2f20e34b2452d561eb0a6 (diff) |
dhcpv6: introduce options type.
Diffstat (limited to 'dhcpv6/option_vendor_opts.go')
-rw-r--r-- | dhcpv6/option_vendor_opts.go | 6 |
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 |