mirror of
https://github.com/jmcorgan/fips.git
synced 2026-08-12 09:33:23 +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:
@@ -138,8 +138,14 @@ impl Node {
|
||||
ack.src_coords,
|
||||
now_ms,
|
||||
);
|
||||
self.coord_cache_mut().insert(
|
||||
datagram.dest_addr,
|
||||
ack.dest_coords,
|
||||
now_ms,
|
||||
);
|
||||
debug!(
|
||||
src = %datagram.src_addr,
|
||||
dest = %datagram.dest_addr,
|
||||
"Cached coords from SessionAck"
|
||||
);
|
||||
}
|
||||
|
||||
@@ -364,9 +364,9 @@ impl Node {
|
||||
}
|
||||
};
|
||||
|
||||
// Build and send SessionAck
|
||||
// Build and send SessionAck (include initiator's coords for return-path warming)
|
||||
let our_coords = self.tree_state.my_coords().clone();
|
||||
let ack = SessionAck::new(our_coords).with_handshake(msg2);
|
||||
let ack = SessionAck::new(our_coords, setup.src_coords).with_handshake(msg2);
|
||||
let ack_payload = ack.encode();
|
||||
let my_addr = *self.node_addr();
|
||||
let mut datagram = SessionDatagram::new(my_addr, *src_addr, ack_payload.clone())
|
||||
|
||||
Reference in New Issue
Block a user