Connect and Disconnect previously only appended a PolicyChange when
the affected node was a subnet router (routeChange) or the database
persist returned a full change. For every other node the peers just
received a small PeerChangedPatch{Online: ...} and no filter rules
were recomputed. That was too narrow: a node going offline or coming
online can affect policy compilation in ways beyond subnet routes.
TestGrantCapRelay Phase 4 exposed this. When the cap/relay target node
went down with `tailscale down`, headscale only sent an Online=false
patch, peers never got a recomputed netmap, and their cached
PeerRelay allocation stayed populated until the 120s assertion
timeout. With a PolicyChange queued on Disconnect, peers immediately
receive a full netmap on relay loss and clear PeerRelay as expected;
the symmetric change on Connect lets Phase 5 re-publish the policy
when the relay comes back.
Drop the now-unused routeChange return from the Disconnect gate.
Updates #2180
|
||
|---|---|---|
| .. | ||
| debug.go | ||
| debug_test.go | ||
| endpoint_test.go | ||
| ephemeral_test.go | ||
| maprequest.go | ||
| maprequest_test.go | ||
| node_store.go | ||
| node_store_test.go | ||
| ssh_check_test.go | ||
| state.go | ||
| tags.go | ||
| test_helpers.go | ||