diff options
Diffstat (limited to 'dhcpv6/options.go')
-rw-r--r-- | dhcpv6/options.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/dhcpv6/options.go b/dhcpv6/options.go index 2c5842c..2fcc9e9 100644 --- a/dhcpv6/options.go +++ b/dhcpv6/options.go @@ -96,6 +96,9 @@ func ParseOption(dataStart []byte) (Option, error) { if err != nil { return nil, err } + if length != opt.Length() { + return nil, fmt.Errorf("different lengths for opt %v: %v != %v", code, length, opt.Length()) + } return opt, nil } |