diff options
Diffstat (limited to 'dhcpv6/option_iaprefix.go')
-rw-r--r-- | dhcpv6/option_iaprefix.go | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/dhcpv6/option_iaprefix.go b/dhcpv6/option_iaprefix.go index c66b242..bb907b2 100644 --- a/dhcpv6/option_iaprefix.go +++ b/dhcpv6/option_iaprefix.go @@ -34,12 +34,7 @@ func (op *OptIAPrefix) ToBytes() []byte { t2.Marshal(buf) buf.Write8(op.prefixLength) - prefix := op.ipv6Prefix.To16() - if prefix != nil { - buf.WriteBytes(prefix) - } else { - buf.WriteBytes(make([]byte, net.IPv6len)) - } + write16(buf, op.ipv6Prefix) buf.WriteBytes(op.Options.ToBytes()) return buf.Data() } |