You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
debug: make DERP send frame (framePeerGone) as limited reply as "nobody's here" #4326
Node A thinks that Node B was last homed at DERP region, say, 5.
But let's say that either Node B disappeared or the control server's broken or Node A's client is broken or... whatever. Assume that Node A can connect to DERP-5 and send frame type frameSendPacket to send to B, but then...
nothing
Currently we just do nothing (besides increment some varz in (*Server).recordDrop), and Node A is none the wiser that Node B isn't in that region.
It'd be nice to send a message (rate-limited) telling Node A that Node B's not there so Node A can locally log "oh, well that's messed up.", which would be useful during debugging connectivity problems.
But we already have framePeerGone used for DRPO (#150) that's very close to what we want. We could probably just reuse it, perhaps with a reason byte (reasons being: because they disconnected (the current use, when not listed), or because you tried to send to them, thinking they were here).
Only question I have is what happens during startup race conditions.
Client B starts up, locates home derp, reports derp5 as home to control
Client A gets told B is at derp5
A connects to derp5, sends frame, receives peerGone
B connects to derp5
???
If the client doesn't alter its behavior upon receiving peerGone, I guess it's fine and becomes just a debugging aid. Is there anything actionable and inexpensive we'd want to do upon receiving a peerGone?
Your race is #212 which I'm still unhappy about :)
But yeah, I was thinking this would be purely for debugging and it wouldn't alter the behavior. Except it'd still clear the DRPO route mapping if set, but that's why the frame exists.
Activity
danderson commentedon Mar 30, 2022
Only question I have is what happens during startup race conditions.
If the client doesn't alter its behavior upon receiving peerGone, I guess it's fine and becomes just a debugging aid. Is there anything actionable and inexpensive we'd want to do upon receiving a peerGone?
bradfitz commentedon Mar 30, 2022
Your race is #212 which I'm still unhappy about :)
But yeah, I was thinking this would be purely for debugging and it wouldn't alter the behavior. Except it'd still clear the DRPO route mapping if set, but that's why the frame exists.
derp/derp_server: add IsClientConnected func.
derp/derp_server: add IsClientConnected func.
derp: add (*Server).IsClientConnectedForTest func.
derp: add (*Server).IsClientConnectedForTest func. (#4331)
derp, magicsock: send new unknown peer frame when destination is unknown
derp, magicsock: send new unknown peer frame when destination is unknown
derp, magicsock: send new unknown peer frame when destination is unknown
derp, magicsock: send new unknown peer frame when destination is unknown
wgengine/magicsock: add envknob to send CallMeMaybe to non-existent peer
derp, derp/derphttp, wgengine/magicsock: Add new PeerGone message typ…
wgengine/magicsock: add envknob to send CallMeMaybe to non-existent peer
derp, derp/derphttp, wgengine/magicsock: Add new PeerGone message typ…
derp, derp/derphttp, wgengine/magicsock: add new PeerGone message typ…
derp, derp/derphttp, wgengine/magicsock: add new PeerGone message typ…
derp, derp/derphttp, wgengine/magicsock: add new PeerGone message typ…
derp, derp/derphttp, wgengine/magicsock: add new PeerGone message typ…
derp, derp/derphttp, wgengine/magicsock: add new PeerGone message typ…
derp, derphttp, magicsock: send new unknown peer frame when destinati…
derp, derphttp, magicsock: send new unknown peer frame when destinati…