Repository navigation
derp, derphttp, magicsock: send new unknown peer frame when destination is unknown - #7552
Conversation
|
I haven't gotten very deeply into DERP yet, so my comments come with a grain of salt. |
|
Upon reflection, I'm rewriting this to push the reason back up the call chain instead of creating a new chan for each different peerGone reason. |
1d1c77a to
ce92b48
Compare
danderson
left a comment
There was a problem hiding this comment.
Looks right to me. Some nitpicky comments since you asked for Go style feedback, but aside from the missing rate limiter I'd say this is good to go.
c96c770 to
1082f4f
Compare
1082f4f to
7021a77
Compare
For testing older client version responses to the PeerGone packet format change. Updates #4326 Signed-off-by: Val <[email protected]>
|
Nit: lowercase verb after colon in |
7021a77 to
ab6b99a
Compare
Leftover from an previous solution to the duplicate client problem. Updates #2751 Signed-off-by: Val <[email protected]>
1443559 to
9102aae
Compare
|
Differences from first version:
I'd be happy to merge this one but still appreciate nitpicky feedback. |
| case derp.PeerGoneReasonDisconnected: | ||
| // Do nothing. | ||
| case derp.PeerGoneReasonNotHere: | ||
| c.logf("[unexpected] magicsock: derp-%d does not know about peer %s, removing route", |
There was a problem hiding this comment.
May want to increment a client metric if this is an unexpected/interesting thing to happen (there's already a few DERP-related metrics in this file).
There was a problem hiding this comment.
Good idea! I added two new metrics, noticed two arguments were swapped for the log message for the unknown reason case and fixed that, and tested the not here path. If you can double check the logf() after metricRecvDiscoDERPPeerGoneUnknown.Add(1), I would appreciate it.
9102aae to
46922c6
Compare
…e Not Here Extend the PeerGone message type by adding a reason byte. Send a PeerGone "Not Here" message when an endpoint sends a disco message to a peer that this server has no record of. Fixes #4326 Signed-off-by: Val <[email protected]>
46922c6 to
8da10be
Compare
…on is unknown (tailscale#7552) * wgengine/magicsock: add envknob to send CallMeMaybe to non-existent peer For testing older client version responses to the PeerGone packet format change. Updates tailscale#4326 Signed-off-by: Val <[email protected]> * derp: remove dead sclient struct member replaceLimiter Leftover from an previous solution to the duplicate client problem. Updates tailscale#2751 Signed-off-by: Val <[email protected]> * derp, derp/derphttp, wgengine/magicsock: add new PeerGone message type Not Here Extend the PeerGone message type by adding a reason byte. Send a PeerGone "Not Here" message when an endpoint sends a disco message to a peer that this server has no record of. Fixes tailscale#4326 Signed-off-by: Val <[email protected]> --------- Signed-off-by: Val <[email protected]>
Updates tailscale#2745 Updates tailscale#7552 Signed-off-by: Spike Curtis <[email protected]>
Updates #2745 Updates #7552 Signed-off-by: Spike Curtis <[email protected]>
Updates tailscale#2745 Updates tailscale#7552 Signed-off-by: Spike Curtis <[email protected]>
Updates tailscale#2745 Updates tailscale#7552 Signed-off-by: Spike Curtis <[email protected]>
If node A sends a CallMeMaybe packet to DERP for node B, and DERP has no record of node B, send an "unknown peer" frame back to node A.
Uses the existing framePeerGone and adds a reason byte at the end in what is intended to be a backwards-compatible manner.
Fixes #4326