diff options
author | Pablo Mazzini <pmazzini@gmail.com> | 2018-08-01 18:25:54 +0200 |
---|---|---|
committer | Pablo Mazzini <pmazzini@gmail.com> | 2018-08-01 18:25:54 +0200 |
commit | 833497ba74dfdd0188176ae38a19de7a03a7858a (patch) | |
tree | 4422669864704455d6c1e22128629368ab48f384 /dhcpv6/option_domainsearchlist.go | |
parent | 1f58265bc02e94b0c530719cda87da780a3813c1 (diff) |
extract rfc1035label
Diffstat (limited to 'dhcpv6/option_domainsearchlist.go')
-rw-r--r-- | dhcpv6/option_domainsearchlist.go | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/dhcpv6/option_domainsearchlist.go b/dhcpv6/option_domainsearchlist.go index 402c68e..cc56ee0 100644 --- a/dhcpv6/option_domainsearchlist.go +++ b/dhcpv6/option_domainsearchlist.go @@ -6,6 +6,8 @@ package dhcpv6 import ( "encoding/binary" "fmt" + + "github.com/insomniacslk/dhcp/dnscompress" ) // OptDomainSearchList list implements a DOMAIN_SEARCH_LIST option @@ -21,7 +23,7 @@ func (op *OptDomainSearchList) ToBytes() []byte { buf := make([]byte, 4) binary.BigEndian.PutUint16(buf[0:2], uint16(DOMAIN_SEARCH_LIST)) binary.BigEndian.PutUint16(buf[2:4], uint16(op.Length())) - buf = append(buf, LabelsToBytes(op.DomainSearchList)...) + buf = append(buf, dnscompress.LabelsToBytes(op.DomainSearchList)...) return buf } @@ -42,7 +44,7 @@ func (op *OptDomainSearchList) String() string { func ParseOptDomainSearchList(data []byte) (*OptDomainSearchList, error) { opt := OptDomainSearchList{} var err error - opt.DomainSearchList, err = LabelsFromBytes(data) + opt.DomainSearchList, err = dnscompress.LabelsFromBytes(data) if err != nil { return nil, err } |