mirror of
https://github.com/netbirdio/netbird.git
synced 2026-10-12 16:39:09 +02:00
The affected-peers resolver loaded only persisted reverse-proxy services, but agent-network services are synthesized on demand and never persisted. As a result the embedded proxy peer was never folded into the affected set when a client's group changed, so the proxy received no network-map update for a newly authorised client and rejected its handshake until a full resync (restart). loadProxyServices now merges the synthesized agent-network services (injected via a registration hook to avoid an import cycle), so proxy peers learn newly authorised clients immediately.
16 lines
741 B
Go
16 lines
741 B
Go
package agentnetwork
|
|
|
|
import "github.com/netbirdio/netbird/management/server/affectedpeers"
|
|
|
|
// init registers the agent-network service synthesiser with the affectedpeers
|
|
// resolver. Agent-network reverse-proxy services are synthesised on demand and
|
|
// never persisted, so the resolver can't load them from the store; without them
|
|
// it can't fold the embedded proxy peer into the affected set on a client
|
|
// group/peer change, and the proxy never learns a newly authorised client until
|
|
// it reconnects. Registered here (rather than via a direct
|
|
// affectedpeers→agentnetwork import) to avoid an import cycle
|
|
// (agentnetwork → account → affectedpeers).
|
|
func init() {
|
|
affectedpeers.SetAgentNetworkSynthesizer(SynthesizeServices)
|
|
}
|