summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorTom McPhail <tom.mcphail@icloud.com>2020-04-21 09:37:03 +1000
committerinsomniac <insomniacslk@users.noreply.github.com>2020-04-21 00:54:42 +0100
commited3125c2efe7026894d9ecf1c41d213d6c1f2010 (patch)
tree3c3a1b70637495d10d17d623d8b65b40eeca95ec
parent5dd7202f19711228cb4a51aa8b3415421c2edefe (diff)
Generate new TransactionID for Request
Signed-off-by: Tom McPhail <tom.mcphail@icloud.com>
-rw-r--r--dhcpv6/dhcpv6message.go7
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 {