From f5ab3598d1cc467e484cc1f7ea4ffa6e8f3cba1f Mon Sep 17 00:00:00 2001 From: Chris Koch Date: Mon, 10 Feb 2020 14:33:15 -0800 Subject: v6: DomainSearchList getter Signed-off-by: Chris Koch --- netboot/netconf.go | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'netboot/netconf.go') 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 -- cgit v1.2.3