diff options
author | Mikael Magnusson <mikma@users.sourceforge.net> | 2020-03-04 21:43:33 +0100 |
---|---|---|
committer | Mikael Magnusson <mikma@users.sourceforge.net> | 2020-03-10 11:16:03 +0100 |
commit | 6875c928a140faa34d2afff9a360115e0dda4914 (patch) | |
tree | 8d3c6dbc3ed8c99413597006ea5b4d04abf0bbcf /dhcpv6/dhcpv6message.go | |
parent | 94e5923c9c44b0e829d793508e6772e6a96feb47 (diff) |
dhcpv6: add IA_PD to request from advertise
Add the IA_PD option to the request from the advertise if present.
Add WithIAPD() as modifier and test.
Signed-off-by: Mikael Magnusson <mikma@users.sourceforge.net>
Diffstat (limited to 'dhcpv6/dhcpv6message.go')
-rw-r--r-- | dhcpv6/dhcpv6message.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/dhcpv6/dhcpv6message.go b/dhcpv6/dhcpv6message.go index 2067fcc..cb0503f 100644 --- a/dhcpv6/dhcpv6message.go +++ b/dhcpv6/dhcpv6message.go @@ -378,6 +378,10 @@ func NewRequestFromAdvertise(adv *Message, modifiers ...Modifier) (*Message, err return nil, fmt.Errorf("IA_NA cannot be nil in ADVERTISE when building REQUEST") } req.AddOption(iana) + // add IA_PD + if iaPd := adv.GetOneOption(OptionIAPD); iaPd != nil { + req.AddOption(iaPd) + } req.AddOption(OptRequestedOption( OptionDNSRecursiveNameServer, OptionDomainSearchList, |