summaryrefslogtreecommitdiffhomepage
path: root/netboot
diff options
context:
space:
mode:
authorAndrea Barberio <insomniac@slackware.it>2018-11-20 16:26:37 +0000
committerinsomniac <insomniacslk@users.noreply.github.com>2018-11-21 10:39:17 +0000
commit2bc2f0b62ecb4d77d5236617ef2de88bcc3a611b (patch)
tree09c6d2b40aeb6f5e9ed6229d6bd79da01d39b688 /netboot
parentbbaa1a7aa2044c0d954c7f10f288c2730cba421c (diff)
rfc1035label: using a structure to hold original data
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