feature/conn25: guard against an index out of bounds panic (#19066)

Updates #cleanup

Signed-off-by: Andrew Lytvynov <awly@tailscale.com>
main
Andrew Lytvynov 4 weeks ago committed by GitHub
parent 34477cf3e7
commit 3a5afc3358
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 3
      feature/conn25/conn25.go

@ -534,6 +534,9 @@ func (c *client) reserveAddresses(domain dnsname.FQDN, dst netip.Addr) (addrs, e
return existing, nil
}
appNames, _ := c.config.appNamesByDomain[domain]
if len(appNames) == 0 {
return addrs{}, fmt.Errorf("no app names found for domain %q", domain)
}
// only reserve for first app
app := appNames[0]
mip, err := c.magicIPPool.next()

Loading…
Cancel
Save