From f4572f96f95113e0591921bc4cb629474c6d7251 Mon Sep 17 00:00:00 2001 From: Jake McGinty Date: Fri, 18 May 2018 20:32:57 -0700 Subject: cookies: implement cookie replies under load --- src/peer.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/peer.rs') diff --git a/src/peer.rs b/src/peer.rs index 04d6a93..0208418 100644 --- a/src/peer.rs +++ b/src/peer.rs @@ -257,7 +257,7 @@ impl Peer { ensure!(len == 12, "incorrect handshake payload length"); let timestamp = timestamp.into(); - Ok(IncompleteIncomingHandshake { their_index: packet.their_index(), timestamp, noise }) + Ok(IncompleteIncomingHandshake { their_index: packet.sender_index(), timestamp, noise }) } /// Takes a new handshake packet (type 0x01), updates the internal peer state, @@ -323,7 +323,7 @@ impl Peer { let _ = session.noise.read_message(packet.noise_bytes(), &mut [])?; session = session.into_transport_mode()?; - session.their_index = packet.their_index(); + session.their_index = packet.sender_index(); session.birthday = Timestamp::now(); self.info.endpoint = Some(addr); -- cgit v1.2.3-59-g8ed1b