summaryrefslogtreecommitdiffhomepage
path: root/dhcpv6/dhcpv6message.go
diff options
context:
space:
mode:
Diffstat (limited to 'dhcpv6/dhcpv6message.go')
-rw-r--r--dhcpv6/dhcpv6message.go4
1 files changed, 1 insertions, 3 deletions
diff --git a/dhcpv6/dhcpv6message.go b/dhcpv6/dhcpv6message.go
index 078f72a..43d9f50 100644
--- a/dhcpv6/dhcpv6message.go
+++ b/dhcpv6/dhcpv6message.go
@@ -314,9 +314,7 @@ func (d *DHCPv6Message) ToBytes() []byte {
buf := uio.NewBigEndianBuffer(nil)
buf.Write8(uint8(d.messageType))
buf.WriteBytes(d.transactionID[:])
- for _, opt := range d.options {
- buf.WriteBytes(opt.ToBytes())
- }
+ buf.WriteBytes(d.options.ToBytes())
return buf.Data()
}