Skip to content

feat: add agent acks to in-memory coordinator #12786

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 14 commits into from
Apr 10, 2024
Prev Previous commit
Next Next commit
don't kill agent connection on invalid RFH
  • Loading branch information
coadler committed Apr 10, 2024
commit 2ee3c51f362b69600c7f83976cd29fb0ac064690
7 changes: 6 additions & 1 deletion tailnet/coordinator.go
Original file line number Diff line number Diff line change
Expand Up @@ -717,7 +717,12 @@ func (c *core) handleReadyForHandshakeLocked(src *peer, rfhs []*proto.Coordinate
}

if !c.tunnels.tunnelExists(src.id, dstID) {
return xerrors.Errorf("tunnel does not exist between %s and %s", src.id.String(), dstID.String())
// We intentionally do not return an error here, since it's
// inherently racy. It's possible for a source to connect, then
// subsequently disconnect before the agent has sent back the RFH.
// Since this could potentially happen to a non-malicious agent, we
// don't want to kill its connection.
continue
}

dst, ok := c.peers[dstID]
Expand Down