diff options
Diffstat (limited to 'dhcpv4/option_domain_search.go')
-rw-r--r-- | dhcpv4/option_domain_search.go | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/dhcpv4/option_domain_search.go b/dhcpv4/option_domain_search.go index b845b59..5ca17a8 100644 --- a/dhcpv4/option_domain_search.go +++ b/dhcpv4/option_domain_search.go @@ -5,6 +5,8 @@ package dhcpv4 import ( "fmt" + + "github.com/insomniacslk/dhcp/dnscompress" ) // OptDomainSearch represents an option encapsulating a domain search list. @@ -20,7 +22,7 @@ func (op *OptDomainSearch) Code() OptionCode { // ToBytes returns a serialized stream of bytes for this option. func (op *OptDomainSearch) ToBytes() []byte { buf := []byte{byte(op.Code()), byte(op.Length())} - buf = append(buf, labelsToBytes(op.DomainSearch)...) + buf = append(buf, dnscompress.LabelsToBytes(op.DomainSearch)...) return buf } @@ -53,7 +55,7 @@ func ParseOptDomainSearch(data []byte) (*OptDomainSearch, error) { if len(data) < 2+length { return nil, ErrShortByteStream } - domainSearch, err := labelsFromBytes(data[2:length+2]) + domainSearch, err := dnscompress.LabelsFromBytes(data[2:length+2]) if err != nil { return nil, err } |