Merge branch 'v2.0' into task/refactor-spn

This commit is contained in:
Natanael Rodriguez Ramos
2025-05-28 11:41:10 +01:00
53 changed files with 2417 additions and 141 deletions

View File

@@ -71,7 +71,8 @@ func getStickiedHub(conn *network.Connection) (sticksTo *stickyHub) {
// If the IP did not stick and we have a domain, check if that sticks.
if sticksTo == nil && conn.Entity.Domain != "" {
sticksTo, ok := stickyDomains[makeStickyDomainKey(conn)]
var ok bool
sticksTo, ok = stickyDomains[makeStickyDomainKey(conn)]
if ok && !sticksTo.isExpired() {
sticksTo.LastSeen = time.Now()
}
@@ -146,6 +147,8 @@ func (t *Tunnel) avoidDestinationHub() {
Avoid: true,
}
log.Warningf("spn/crew: avoiding %s for %s", t.dstPin.Hub, ipKey)
// TODO: Question: Should we avoid the domain as well? (stickyDomains)
}
func cleanStickyHubs(ctx *mgr.WorkerCtx) error {