summaryrefslogtreecommitdiffhomepage
path: root/dhcpv6
diff options
context:
space:
mode:
authorAndrea Barberio <insomniac@slackware.it>2017-12-13 19:01:27 +0000
committerAndrea Barberio <insomniac@slackware.it>2017-12-13 19:01:27 +0000
commit307f1cd1b31c540ae4d90a6209b7c40e3a53fc64 (patch)
tree58431c5cdda0c191cc71b9638f7f0fd7a3dd2aae /dhcpv6
parent7c83657928444d07820bf4eb1f99a7a4b52441ea (diff)
Fixed off by one
Diffstat (limited to 'dhcpv6')
-rw-r--r--dhcpv6/option_nii.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/dhcpv6/option_nii.go b/dhcpv6/option_nii.go
index 1df1579..85c9d4b 100644
--- a/dhcpv6/option_nii.go
+++ b/dhcpv6/option_nii.go
@@ -39,10 +39,10 @@ func (op *OptNetworkInterfaceId) Code() OptionCode {
func (op *OptNetworkInterfaceId) ToBytes() []byte {
buf := make([]byte, 7)
binary.BigEndian.PutUint16(buf[0:2], uint16(OPTION_NII))
- binary.BigEndian.PutUint16(buf[2:5], uint16(op.Length()))
- buf[5] = op.type_
- buf[6] = op.major
- buf[7] = op.minor
+ binary.BigEndian.PutUint16(buf[2:4], uint16(op.Length()))
+ buf[4] = op.type_
+ buf[5] = op.major
+ buf[6] = op.minor
return buf
}