diff options
author | Andrea Barberio <insomniac@slackware.it> | 2018-12-09 14:31:39 +0000 |
---|---|---|
committer | Andrea Barberio <insomniac@slackware.it> | 2018-12-09 14:31:39 +0000 |
commit | 715749a2dee834068a3d5a1ba6ad58512373cd2a (patch) | |
tree | 5eadcd9603e0ecedf472bab6abc1cb563eaa4904 /dhcpv6 | |
parent | 1faed9deece4fd3d0503bc67ab8b71fe253ef682 (diff) |
Addressed pmazzini's feedback
Diffstat (limited to 'dhcpv6')
-rw-r--r-- | dhcpv6/modifiers.go | 6 |
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) } |