summaryrefslogtreecommitdiffhomepage
path: root/netboot
diff options
context:
space:
mode:
Diffstat (limited to 'netboot')
-rw-r--r--netboot/netconf.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/netboot/netconf.go b/netboot/netconf.go
index ec6a5e1..aef4efa 100644
--- a/netboot/netconf.go
+++ b/netboot/netconf.go
@@ -69,7 +69,7 @@ func GetNetConfFromPacketv6(d *dhcpv6.DHCPv6Message) (*NetConf, error) {
if opt != nil {
odomains := opt.(*dhcpv6.OptDomainSearchList)
// TODO should this be copied?
- netconf.DNSSearchList = odomains.DomainSearchList
+ netconf.DNSSearchList = odomains.DomainSearchList.Labels
}
return &netconf, nil
@@ -134,10 +134,10 @@ func GetNetConfFromPacketv4(d *dhcpv4.DHCPv4) (*NetConf, error) {
dnsDomainSearchListOption := d.GetOneOption(dhcpv4.OptionDNSDomainSearchList)
if dnsDomainSearchListOption != nil {
dnsSearchList := dnsDomainSearchListOption.(*dhcpv4.OptDomainSearch).DomainSearch
- if len(dnsSearchList) == 0 {
+ if len(dnsSearchList.Labels) == 0 {
return nil, errors.New("dns search list is empty")
}
- netconf.DNSSearchList = dnsSearchList
+ netconf.DNSSearchList = dnsSearchList.Labels
}
// get default gateway