diff --git a/hscontrol/mapper/mapper.go b/hscontrol/mapper/mapper.go index 4f39ec35b..4c42e98dc 100644 --- a/hscontrol/mapper/mapper.go +++ b/hscontrol/mapper/mapper.go @@ -174,19 +174,19 @@ func nextDNSProfileFromCapMap(capMap tailcfg.NodeCapMap) string { candidates := make([]string, 0, len(capMap)) - for cap := range capMap { - if cap == nextDNSAttrNoInfo { + for attr := range capMap { + if attr == nextDNSAttrNoInfo { continue } - profile, ok := strings.CutPrefix(string(cap), nextDNSAttrPrefix) + profile, ok := strings.CutPrefix(string(attr), nextDNSAttrPrefix) if !ok || profile == "" { continue } if !nextDNSProfileRE.MatchString(profile) { log.Warn(). - Str("cap", string(cap)). + Str("cap", string(attr)). Msg("nextdns profile rejected: must match [A-Za-z0-9._-]{1,64}") continue