dns: Fix search domain expansion

DHCP option 119/15 and resolved link domains are not rooted, so appending
them to the query name produced a non-FQDN name, failing to pack with
"domain must be fully qualified".
This commit is contained in:
世界
2026-07-25 08:14:59 +08:00
parent 67a600dbfb
commit 397fb4d20a
2 changed files with 11 additions and 4 deletions

View File

@@ -204,10 +204,12 @@ func (i *Service) onNetworkUpdate() {
}
func (conf *TransportLink) nameList(ndots int, name string) []string {
search := common.Map(common.Filter(conf.domain, func(it LinkDomain) bool {
search := common.Filter(common.Map(common.Filter(conf.domain, func(it LinkDomain) bool {
return !it.RoutingOnly
}), func(it LinkDomain) string {
return it.Domain
return mDNS.Fqdn(it.Domain)
}), func(it string) bool {
return it != "."
})
l := len(name)