appc: fix DomainRoutes copy
The non-referential copy destination doesn't extend the map contents, but also the read of a non-key is returning a zero value not bound to the map contents in any way. Updates tailscale/corp#15657 Signed-off-by: James Tucker <james@tailscale.com>
This commit is contained in:
committed by
James Tucker
parent
b8ac3c5191
commit
245ddb157b
@@ -113,7 +113,7 @@ func (e *AppConnector) DomainRoutes() map[string][]netip.Addr {
|
||||
|
||||
drCopy := make(map[string][]netip.Addr)
|
||||
for k, v := range e.domains {
|
||||
copy(drCopy[k], v)
|
||||
drCopy[k] = append(drCopy[k], v...)
|
||||
}
|
||||
|
||||
return drCopy
|
||||
|
||||
Reference in New Issue
Block a user