mirror of
https://github.com/jmcorgan/fips.git
synced 2026-07-30 19:46:15 +00:00
Add dest_coords to SessionAck for return-path routing
SessionAck previously only carried the responder's coordinates (src_coords). When the return path diverged from the forward path (e.g., after tree reconvergence), transit nodes on the return path lacked the initiator's coordinates and couldn't route the SessionAck back, causing handshake timeouts. Add dest_coords (initiator's coordinates) to the SessionAck wire format, mirroring SessionSetup's design. Transit nodes now cache both endpoints' coordinates when forwarding a SessionAck, making the return path self-sufficient regardless of path asymmetry. Root cause confirmed by churn-20 sim log analysis: the n04-n14 handshake failure was caused by n15 (return-path transit) lacking n04's coordinates, not by stale tree routes through a downed node.
This commit is contained in:
@@ -116,7 +116,7 @@ The handshake is carried in SessionSetup and SessionAck messages:
|
||||
1. **Initiator** sends SessionSetup containing Noise IK msg1 and both
|
||||
parties' tree coordinates
|
||||
2. **Responder** processes msg1, learns initiator identity, sends SessionAck
|
||||
containing Noise IK msg2 and its own coordinates
|
||||
containing Noise IK msg2 and both parties' tree coordinates
|
||||
3. Both parties derive identical symmetric session keys
|
||||
|
||||
Packets that trigger session establishment are queued (with bounded buffer)
|
||||
@@ -130,8 +130,10 @@ As the message transits intermediate nodes, each node caches these coordinates,
|
||||
warming the path for subsequent data packets that carry only addresses (no
|
||||
coordinates).
|
||||
|
||||
SessionAck carries the responder's coordinates back along the reverse path,
|
||||
warming caches in the other direction.
|
||||
SessionAck carries both the responder's and initiator's coordinates back
|
||||
along the reverse path, warming caches in the other direction. This ensures
|
||||
return-path transit nodes can route even when the reverse path diverges from
|
||||
the forward path (e.g., after tree reconvergence).
|
||||
|
||||
### Simultaneous Initiation
|
||||
|
||||
|
||||
Reference in New Issue
Block a user