diff options
author | Tom McPhail <tom.mcphail@icloud.com> | 2020-04-21 09:37:03 +1000 |
---|---|---|
committer | insomniac <insomniacslk@users.noreply.github.com> | 2020-04-21 00:54:42 +0100 |
commit | ed3125c2efe7026894d9ecf1c41d213d6c1f2010 (patch) | |
tree | 3c3a1b70637495d10d17d623d8b65b40eeca95ec /dhcpv6 | |
parent | 5dd7202f19711228cb4a51aa8b3415421c2edefe (diff) |
Generate new TransactionID for Request
Signed-off-by: Tom McPhail <tom.mcphail@icloud.com>
Diffstat (limited to 'dhcpv6')
-rw-r--r-- | dhcpv6/dhcpv6message.go | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/dhcpv6/dhcpv6message.go b/dhcpv6/dhcpv6message.go index 7d96ce3..a4da0a4 100644 --- a/dhcpv6/dhcpv6message.go +++ b/dhcpv6/dhcpv6message.go @@ -354,10 +354,11 @@ func NewRequestFromAdvertise(adv *Message, modifiers ...Modifier) (*Message, err return nil, fmt.Errorf("The passed ADVERTISE must have ADVERTISE type set") } // build REQUEST from ADVERTISE - req := &Message{ - MessageType: MessageTypeRequest, - TransactionID: adv.TransactionID, + req, err := NewMessage() + if err != nil { + return nil, err } + req.MessageType = MessageTypeRequest // add Client ID cid := adv.GetOneOption(OptionClientID) if cid == nil { |