summaryrefslogtreecommitdiffhomepage
path: root/dhcpv4/options.go
diff options
context:
space:
mode:
authorSean Karlage <skarlage@fb.com>2018-08-15 10:17:59 -0700
committerSean Karlage <skarlage@fb.com>2018-08-15 10:17:59 -0700
commit3a9b7911aa8d69f16a3d11bdaf2dc757470192d0 (patch)
treea6efb24290b69204d5f002d739a00d1675d27d10 /dhcpv4/options.go
parent78d75f4d4be95787bd3e8b1bf28172059d09273d (diff)
parent926a42d133247d7a4fa388548e4323b77421f798 (diff)
Merge branch 'master' into bsdp-acks
Diffstat (limited to 'dhcpv4/options.go')
-rw-r--r--dhcpv4/options.go3
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