summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--dhcpv6/modifiers.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/dhcpv6/modifiers.go b/dhcpv6/modifiers.go
index fc6d87b..16c71a3 100644
--- a/dhcpv6/modifiers.go
+++ b/dhcpv6/modifiers.go
@@ -69,7 +69,11 @@ func WithArchType(at iana.ArchType) Modifier {
// options
func WithIANA(addrs ...OptIAAddress) Modifier {
return func(d DHCPv6) DHCPv6 {
- iaNa := &OptIANA{}
+ opt := d.GetOneOption(OptionIANA)
+ if opt == nil {
+ opt = &OptIANA{}
+ }
+ iaNa := opt.(*OptIANA)
for _, addr := range addrs {
iaNa.AddOption(&addr)
}