appc: prevent duplication of wildcard entries on map updates

Updates #15437
Signed-off-by: James Tucker <james@tailscale.com>
This commit is contained in:
James Tucker
2023-11-09 16:05:50 -08:00
committed by James Tucker
parent 6cce5fe001
commit 1a143963ec
2 changed files with 14 additions and 1 deletions
+1
View File
@@ -71,6 +71,7 @@ func (e *AppConnector) UpdateDomains(domains []string) {
var oldDomains map[string][]netip.Addr
oldDomains, e.domains = e.domains, make(map[string][]netip.Addr, len(domains))
e.wildcards = e.wildcards[:0]
for _, d := range domains {
d = strings.ToLower(d)
if len(d) == 0 {