mirror of
https://github.com/tailscale/tailscale.git
synced 2025-12-06 01:41:28 +01:00
wgengine/magicsock: trigger peer relay path discovery on CallMeMaybe RX (#16929)
Updates tailscale/corp#30333 Signed-off-by: Jordan Whited <jordan@tailscale.com>
This commit is contained in:
parent
b5f834aef8
commit
9403ba8c69
@ -1964,7 +1964,25 @@ func (de *endpoint) handleCallMeMaybe(m *disco.CallMeMaybe) {
|
|||||||
for _, st := range de.endpointState {
|
for _, st := range de.endpointState {
|
||||||
st.lastPing = 0
|
st.lastPing = 0
|
||||||
}
|
}
|
||||||
de.sendDiscoPingsLocked(mono.Now(), false)
|
monoNow := mono.Now()
|
||||||
|
de.sendDiscoPingsLocked(monoNow, false)
|
||||||
|
|
||||||
|
// This hook is required to trigger peer relay path discovery around
|
||||||
|
// disco "tailscale ping" initiated by de. We may be configured with peer
|
||||||
|
// relay servers that differ from de.
|
||||||
|
//
|
||||||
|
// The only other peer relay path discovery hook is in [endpoint.heartbeat],
|
||||||
|
// which is kicked off around outbound WireGuard packet flow, or if you are
|
||||||
|
// the "tailscale ping" initiator. Disco "tailscale ping" does not propagate
|
||||||
|
// into wireguard-go.
|
||||||
|
//
|
||||||
|
// We choose not to hook this around disco ping reception since peer relay
|
||||||
|
// path discovery can also trigger disco ping transmission, which *could*
|
||||||
|
// lead to an infinite loop of peer relay path discovery between two peers,
|
||||||
|
// absent intended triggers.
|
||||||
|
if de.wantUDPRelayPathDiscoveryLocked(monoNow) {
|
||||||
|
de.discoverUDPRelayPathsLocked(monoNow)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (de *endpoint) populatePeerStatus(ps *ipnstate.PeerStatus) {
|
func (de *endpoint) populatePeerStatus(ps *ipnstate.PeerStatus) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user