summaryrefslogtreecommitdiffhomepage
path: root/dhcpv6/dhcpv6message.go
diff options
context:
space:
mode:
Diffstat (limited to 'dhcpv6/dhcpv6message.go')
-rw-r--r--dhcpv6/dhcpv6message.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/dhcpv6/dhcpv6message.go b/dhcpv6/dhcpv6message.go
index 1ea73f7..0cd34f0 100644
--- a/dhcpv6/dhcpv6message.go
+++ b/dhcpv6/dhcpv6message.go
@@ -280,9 +280,11 @@ func (d *DHCPv6Message) UpdateOption(option Option) {
if opt.Code() == option.Code() {
d.options[idx] = option
// don't look further
- break
+ return
}
}
+ // if not found, add it
+ d.AddOption(option)
}
func (d *DHCPv6Message) String() string {