diff options
Diffstat (limited to 'dhcpv4/options.go')
-rw-r--r-- | dhcpv4/options.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/dhcpv4/options.go b/dhcpv4/options.go index d869b7d..02fa6e4 100644 --- a/dhcpv4/options.go +++ b/dhcpv4/options.go @@ -126,6 +126,9 @@ func OptionsFromBytesWithoutMagicCookie(data []byte) ([]Option, error) { return nil, err } options = append(options, opt) + if opt.Code() == OptionEnd { + break + } // Options with zero length have no length byte, so here we handle the // ones with nonzero length |