summaryrefslogtreecommitdiffhomepage
path: root/dhcpv6/option_iaaddress.go
diff options
context:
space:
mode:
authorPablo Mazzini <pmazzini@gmail.com>2020-03-09 19:48:51 +0000
committerGitHub <noreply@github.com>2020-03-09 19:48:51 +0000
commit030b5b237deb0bb0c4d821dde661af87e9f0263c (patch)
tree2657c611cc944321182aa37db73bc2430b9d402e /dhcpv6/option_iaaddress.go
parentbd34b7c6963c8c124b45759423d41987d428668e (diff)
parent27111faab6c0ca7834f2078eb9a14615c8f4fa59 (diff)
Merge pull request #365 from hugelgupf/write16
dhcpv6: always write 16-byte IPs
Diffstat (limited to 'dhcpv6/option_iaaddress.go')
-rw-r--r--dhcpv6/option_iaaddress.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/dhcpv6/option_iaaddress.go b/dhcpv6/option_iaaddress.go
index 9752ee7..bb92c7a 100644
--- a/dhcpv6/option_iaaddress.go
+++ b/dhcpv6/option_iaaddress.go
@@ -47,7 +47,7 @@ func (op *OptIAAddress) Code() OptionCode {
// ToBytes serializes the option and returns it as a sequence of bytes
func (op *OptIAAddress) ToBytes() []byte {
buf := uio.NewBigEndianBuffer(nil)
- buf.WriteBytes(op.IPv6Addr.To16())
+ write16(buf, op.IPv6Addr)
t1 := Duration{op.PreferredLifetime}
t1.Marshal(buf)