summaryrefslogtreecommitdiffhomepage
path: root/netboot/netconf.go
diff options
context:
space:
mode:
authorChris Koch <chrisko@google.com>2020-02-10 14:33:15 -0800
committerinsomniac <insomniacslk@users.noreply.github.com>2020-03-05 15:51:55 +0000
commitf5ab3598d1cc467e484cc1f7ea4ffa6e8f3cba1f (patch)
tree6babfbb1a3787dcb92c73b1ecf658f8245c74e19 /netboot/netconf.go
parent54c911b4349d9fc445ad10c5399db12a58dfcec9 (diff)
v6: DomainSearchList getter
Signed-off-by: Chris Koch <chrisko@google.com>
Diffstat (limited to 'netboot/netconf.go')
-rw-r--r--netboot/netconf.go8
1 files changed, 3 insertions, 5 deletions
diff --git a/netboot/netconf.go b/netboot/netconf.go
index 6f05e93..78ddff8 100644
--- a/netboot/netconf.go
+++ b/netboot/netconf.go
@@ -66,11 +66,9 @@ func GetNetConfFromPacketv6(d *dhcpv6.Message) (*NetConf, error) {
}
netconf.DNSServers = dns
- opt := d.GetOneOption(dhcpv6.OptionDomainSearchList)
- if opt != nil {
- odomains := opt.(*dhcpv6.OptDomainSearchList)
- // TODO should this be copied?
- netconf.DNSSearchList = odomains.DomainSearchList.Labels
+ domains := d.Options.DomainSearchList()
+ if domains != nil {
+ netconf.DNSSearchList = domains.Labels
}
return &netconf, nil