From ad064cca079cd1f40f04253bffd470fd7f69eebe Mon Sep 17 00:00:00 2001 From: ianswett Date: Wed, 17 Jul 2019 18:47:08 -0400 Subject: [PATCH 01/24] Update draft-ietf-quic-recovery.md --- draft-ietf-quic-recovery.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/draft-ietf-quic-recovery.md b/draft-ietf-quic-recovery.md index fc55bb4f33..1b1fef3d80 100644 --- a/draft-ietf-quic-recovery.md +++ b/draft-ietf-quic-recovery.md @@ -1188,9 +1188,10 @@ SetLossDetectionTimer(): return // Don't arm timer if there are no ack-eliciting packets - // in flight and the handshake is complete. - if (endpoint is client with 1-RTT keys && - no ack-eliciting packets in flight): + // in flight and the endpoint is a server or has + // completed the handshake. + if (no ack-eliciting packets in flight && + (endpoint is server or has 1-RTT keys)): loss_detection_timer.cancel() return From d1d9bc9d5bf77b460a14cefc94938753996c010d Mon Sep 17 00:00:00 2001 From: ianswett Date: Fri, 19 Jul 2019 09:31:25 -0400 Subject: [PATCH 02/24] Consistent ifs --- draft-ietf-quic-recovery.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/draft-ietf-quic-recovery.md b/draft-ietf-quic-recovery.md index 1b1fef3d80..f7da831a77 100644 --- a/draft-ietf-quic-recovery.md +++ b/draft-ietf-quic-recovery.md @@ -1090,11 +1090,11 @@ OnAckReceived(ack, pn_space): // If the largest acknowledged is newly acked and // at least one ack-eliciting was newly acked, update the RTT. if (sent_packets[pn_space][ack.largest_acked] && - IncludesAckEliciting(newly_acked_packets)) + IncludesAckEliciting(newly_acked_packets)): latest_rtt = now - sent_packets[pn_space][ack.largest_acked].time_sent ack_delay = 0 - if pn_space == ApplicationData: + if (pn_space == ApplicationData): ack_delay = ack.ack_delay UpdateRtt(ack_delay) @@ -1174,8 +1174,8 @@ GetEarliestLossTime(): time = loss_time[Initial] space = Initial for pn_space in [ Handshake, ApplicationData ]: - if loss_time[pn_space] != 0 && - (time == 0 || loss_time[pn_space] < time): + if (loss_time[pn_space] != 0 && + (time == 0 || loss_time[pn_space] < time)): time = loss_time[pn_space]; space = pn_space return time, space @@ -1400,7 +1400,7 @@ acked_packet from sent_packets. if (InCongestionRecovery(acked_packet.time_sent)): // Do not increase congestion window in recovery period. return - if (IsAppLimited()) + if (IsAppLimited()): // Do not increase congestion_window if application // limited. return From 26ecb8f304b977f753cb9afedd25e843600146f3 Mon Sep 17 00:00:00 2001 From: ianswett Date: Sat, 20 Jul 2019 18:33:43 -0400 Subject: [PATCH 03/24] Martin Duke's suggestion --- draft-ietf-quic-recovery.md | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/draft-ietf-quic-recovery.md b/draft-ietf-quic-recovery.md index f7da831a77..5c9f78a1dd 100644 --- a/draft-ietf-quic-recovery.md +++ b/draft-ietf-quic-recovery.md @@ -581,13 +581,13 @@ data. If no data can be sent, then the PTO alarm MUST NOT be armed until data has been received from the client. Because the server could be blocked until more packets are received, the client -MUST ensure that the retransmission timer is set if the client does not yet -have 1-RTT keys. If the probe timer expires before the client has 1-RTT keys, -it is possible that the client may not have any crypto data to retransmit. -However, the client MUST send a new packet, containing only PADDING frames if -necessary, to allow the server to continue sending data. If Handshake keys -are available to the client, it MUST send a Handshake packet, and otherwise -it MUST send an Initial packet in a UDP datagram of at least 1200 bytes. +MUST ensure that the retransmission timer is set if the client has not received +an ACK in a Handshake packet or does not yet have 1-RTT keys. If the probe +timer expires and the client does not have any crypto data to retransmit it +MUST send a packet, containing only PADDING frames if necessary, to allow the +server to continue sending data. If Handshake keys are available to the client, +it MUST send a Handshake packet, and otherwise it MUST send an Initial packet +in a UDP datagram of at least 1200 bytes. Because Initial packets containing only PADDING do not elicit an acknowledgement, they may never be acknowledged, but they are removed from @@ -1188,10 +1188,12 @@ SetLossDetectionTimer(): return // Don't arm timer if there are no ack-eliciting packets - // in flight and the endpoint is a server or has - // completed the handshake. + // in flight and the endpoint is a server. Do arm the + // timer until the client has received a Handshake ACK + // or completed the handshake. if (no ack-eliciting packets in flight && - (endpoint is server or has 1-RTT keys)): + (endpoint is server or has 1-RTT keys + or has received Handshake ACK)): loss_detection_timer.cancel() return From b9779401d24a9d1c9c98088dd3dce72df04a7730 Mon Sep 17 00:00:00 2001 From: ianswett Date: Sat, 20 Jul 2019 21:14:35 -0400 Subject: [PATCH 04/24] Remove || --- draft-ietf-quic-recovery.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/draft-ietf-quic-recovery.md b/draft-ietf-quic-recovery.md index 5c9f78a1dd..1006ca4653 100644 --- a/draft-ietf-quic-recovery.md +++ b/draft-ietf-quic-recovery.md @@ -1175,7 +1175,7 @@ GetEarliestLossTime(): space = Initial for pn_space in [ Handshake, ApplicationData ]: if (loss_time[pn_space] != 0 && - (time == 0 || loss_time[pn_space] < time)): + (time == 0 or loss_time[pn_space] < time)): time = loss_time[pn_space]; space = pn_space return time, space @@ -1270,7 +1270,7 @@ DetectLostPackets(pn_space): continue // Mark packet as lost, or set time when it should be marked. - if (unacked.time_sent <= lost_send_time || + if (unacked.time_sent <= lost_send_time or largest_acked_packet[pn_space] >= unacked.packet_number + kPacketThreshold): sent_packets[pn_space].remove(unacked.packet_number) From f079e9dc3664d2abe4e5a0b1b615c826fbd9be15 Mon Sep 17 00:00:00 2001 From: ianswett Date: Sun, 21 Jul 2019 07:30:48 -0400 Subject: [PATCH 05/24] Use || and && consistently --- draft-ietf-quic-recovery.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/draft-ietf-quic-recovery.md b/draft-ietf-quic-recovery.md index 1006ca4653..da365838eb 100644 --- a/draft-ietf-quic-recovery.md +++ b/draft-ietf-quic-recovery.md @@ -1175,7 +1175,7 @@ GetEarliestLossTime(): space = Initial for pn_space in [ Handshake, ApplicationData ]: if (loss_time[pn_space] != 0 && - (time == 0 or loss_time[pn_space] < time)): + (time == 0 || loss_time[pn_space] < time)): time = loss_time[pn_space]; space = pn_space return time, space @@ -1192,8 +1192,9 @@ SetLossDetectionTimer(): // timer until the client has received a Handshake ACK // or completed the handshake. if (no ack-eliciting packets in flight && - (endpoint is server or has 1-RTT keys - or has received Handshake ACK)): + (endpoint is server || + has 1-RTT keys || + has received Handshake ACK)): loss_detection_timer.cancel() return @@ -1270,7 +1271,7 @@ DetectLostPackets(pn_space): continue // Mark packet as lost, or set time when it should be marked. - if (unacked.time_sent <= lost_send_time or + if (unacked.time_sent <= lost_send_time || largest_acked_packet[pn_space] >= unacked.packet_number + kPacketThreshold): sent_packets[pn_space].remove(unacked.packet_number) From 59c3af3f32313b54f31eacd6d64df1ad19c1210c Mon Sep 17 00:00:00 2001 From: ianswett Date: Sun, 21 Jul 2019 17:41:24 -0400 Subject: [PATCH 06/24] Update draft-ietf-quic-recovery.md Co-Authored-By: Jana Iyengar --- draft-ietf-quic-recovery.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/draft-ietf-quic-recovery.md b/draft-ietf-quic-recovery.md index c951434f6f..c45b42cfca 100644 --- a/draft-ietf-quic-recovery.md +++ b/draft-ietf-quic-recovery.md @@ -1192,7 +1192,7 @@ SetLossDetectionTimer(): // Don't arm timer if there are no ack-eliciting packets // in flight and the endpoint is a server. Do arm the // timer until the client has received a Handshake ACK - // or completed the handshake. + // or has completed the handshake. if (no ack-eliciting packets in flight && (endpoint is server || has 1-RTT keys || From fef247f1c6f052f0eb439b816018c42879769f9e Mon Sep 17 00:00:00 2001 From: ianswett Date: Fri, 23 Aug 2019 10:31:38 -0400 Subject: [PATCH 07/24] Martin's suggestion --- draft-ietf-quic-recovery.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/draft-ietf-quic-recovery.md b/draft-ietf-quic-recovery.md index c45b42cfca..20484e5495 100644 --- a/draft-ietf-quic-recovery.md +++ b/draft-ietf-quic-recovery.md @@ -582,7 +582,7 @@ data has been received from the client. Because the server could be blocked until more packets are received, the client MUST ensure that the retransmission timer is set if the client has not received -an ACK in a Handshake packet or does not yet have 1-RTT keys. If the probe +an ACK in a Handshake packet and does not yet have 1-RTT keys. If the probe timer expires before the client has 1-RTT keys, it is possible that the client may not have any crypto data to retransmit. However, the client MUST send a new packet to allow the server to continue sending data. At this stage in the From e97e175e7c82e6db7d5478c3d29be2e169773d85 Mon Sep 17 00:00:00 2001 From: ianswett Date: Sat, 24 Aug 2019 19:17:50 -0400 Subject: [PATCH 08/24] Jana's suggestion --- draft-ietf-quic-recovery.md | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/draft-ietf-quic-recovery.md b/draft-ietf-quic-recovery.md index 20484e5495..ac0ce7f292 100644 --- a/draft-ietf-quic-recovery.md +++ b/draft-ietf-quic-recovery.md @@ -580,18 +580,21 @@ data at Handshake encryption MUST be retransmitted before any ApplicationData data. If no data can be sent, then the PTO alarm MUST NOT be armed until data has been received from the client. -Because the server could be blocked until more packets are received, the client -MUST ensure that the retransmission timer is set if the client has not received -an ACK in a Handshake packet and does not yet have 1-RTT keys. If the probe -timer expires before the client has 1-RTT keys, it is possible that the client -may not have any crypto data to retransmit. However, the client MUST send a new -packet to allow the server to continue sending data. At this stage in the -connection, when few to none RTT samples have been generated, it is possible -that the probe timer expiration is due to an incorrect RTT estimate at the -client. To allow the client to improve its RTT estimate, the new packet that -it sends MUST be ack-eliciting. If Handshake keys are available to the client, -it MUST send a Handshake packet, and otherwise it MUST send an Initial packet -in a UDP datagram of at least 1200 bytes. +Since the server could be blocked until more packets are received from the +client, it is the client's responsibility to send packets to unblock the server +until it is certain that the server has finished its address validation +(see Section 8 of {{QUIC-TRANSPORT}}). That is, the client MUST set the +probe timer if one of the following conditions is true: the client +does not yet have 1-RTT keys, or the client has not received an acknowledgement +for one of its Handshake packets. + +Prior to handshake completion, when few to none RTT samples have been +generated, it is possible that the probe timer expiration is due to an +incorrect RTT estimate at the client. To allow the client to improve its RTT +estimate, the new packet that it sends MUST be ack-eliciting. If Handshake +keys are available to the client, it MUST send a Handshake packet, and +otherwise it MUST send an Initial packet in a UDP datagram of at least 1200 +bytes. Initial packets and Handshake packets may never be acknowledged, but they are removed from bytes in flight when the Initial and Handshake keys are discarded. From b47dbbc79b26d958d54146d09c0c172cd28db5d4 Mon Sep 17 00:00:00 2001 From: Jana Iyengar Date: Tue, 27 Aug 2019 15:19:35 -0700 Subject: [PATCH 09/24] nit --- draft-ietf-quic-recovery.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/draft-ietf-quic-recovery.md b/draft-ietf-quic-recovery.md index ac0ce7f292..5f1ae8f423 100644 --- a/draft-ietf-quic-recovery.md +++ b/draft-ietf-quic-recovery.md @@ -1193,7 +1193,7 @@ SetLossDetectionTimer(): return // Don't arm timer if there are no ack-eliciting packets - // in flight and the endpoint is a server. Do arm the + // in flight and the endpoint is a server. Arm the // timer until the client has received a Handshake ACK // or has completed the handshake. if (no ack-eliciting packets in flight && From 617c4a7d1b2cc2b254935e0a5c48753f00b030c9 Mon Sep 17 00:00:00 2001 From: ianswett Date: Tue, 3 Sep 2019 18:43:30 -0400 Subject: [PATCH 10/24] Update draft-ietf-quic-recovery.md Co-Authored-By: Jana Iyengar --- draft-ietf-quic-recovery.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/draft-ietf-quic-recovery.md b/draft-ietf-quic-recovery.md index 5f1ae8f423..765b708894 100644 --- a/draft-ietf-quic-recovery.md +++ b/draft-ietf-quic-recovery.md @@ -1193,7 +1193,7 @@ SetLossDetectionTimer(): return // Don't arm timer if there are no ack-eliciting packets - // in flight and the endpoint is a server. Arm the + // in flight and the endpoint is a server. Do not cancel the // timer until the client has received a Handshake ACK // or has completed the handshake. if (no ack-eliciting packets in flight && From d2d1bb8075af5460de0bfd2d5e604fce502168c0 Mon Sep 17 00:00:00 2001 From: ianswett Date: Tue, 3 Sep 2019 18:43:38 -0400 Subject: [PATCH 11/24] Update draft-ietf-quic-recovery.md Co-Authored-By: Jana Iyengar --- draft-ietf-quic-recovery.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/draft-ietf-quic-recovery.md b/draft-ietf-quic-recovery.md index 765b708894..1059100319 100644 --- a/draft-ietf-quic-recovery.md +++ b/draft-ietf-quic-recovery.md @@ -1192,7 +1192,7 @@ SetLossDetectionTimer(): loss_detection_timer.update(loss_time) return - // Don't arm timer if there are no ack-eliciting packets + // Cancel the timer if there are no ack-eliciting packets // in flight and the endpoint is a server. Do not cancel the // timer until the client has received a Handshake ACK // or has completed the handshake. From fd8bdd7adecd6f5fde89e440d1ae18eb28743d7a Mon Sep 17 00:00:00 2001 From: ianswett Date: Tue, 3 Sep 2019 18:48:41 -0400 Subject: [PATCH 12/24] Update draft-ietf-quic-recovery.md --- draft-ietf-quic-recovery.md | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/draft-ietf-quic-recovery.md b/draft-ietf-quic-recovery.md index 1059100319..1b8b2f97f6 100644 --- a/draft-ietf-quic-recovery.md +++ b/draft-ietf-quic-recovery.md @@ -584,9 +584,8 @@ Since the server could be blocked until more packets are received from the client, it is the client's responsibility to send packets to unblock the server until it is certain that the server has finished its address validation (see Section 8 of {{QUIC-TRANSPORT}}). That is, the client MUST set the -probe timer if one of the following conditions is true: the client -does not yet have 1-RTT keys, or the client has not received an acknowledgement -for one of its Handshake packets. +probe timer if the client has not received an acknowledgement for one of its +Handshake or 1-RTT packets. Prior to handshake completion, when few to none RTT samples have been generated, it is possible that the probe timer expiration is due to an @@ -1198,8 +1197,8 @@ SetLossDetectionTimer(): // or has completed the handshake. if (no ack-eliciting packets in flight && (endpoint is server || - has 1-RTT keys || - has received Handshake ACK)): + has received Handshake ACK || + has received 1-RTT ACK)): loss_detection_timer.cancel() return From 9a77e26fa76c8290d1738c53f07666de75ebad47 Mon Sep 17 00:00:00 2001 From: ianswett Date: Tue, 3 Sep 2019 18:50:37 -0400 Subject: [PATCH 13/24] Update draft-ietf-quic-recovery.md --- draft-ietf-quic-recovery.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/draft-ietf-quic-recovery.md b/draft-ietf-quic-recovery.md index 1b8b2f97f6..b8de19b4b4 100644 --- a/draft-ietf-quic-recovery.md +++ b/draft-ietf-quic-recovery.md @@ -1193,8 +1193,7 @@ SetLossDetectionTimer(): // Cancel the timer if there are no ack-eliciting packets // in flight and the endpoint is a server. Do not cancel the - // timer until the client has received a Handshake ACK - // or has completed the handshake. + // timer until the client has received a Handshake or 1-RTT ACK. if (no ack-eliciting packets in flight && (endpoint is server || has received Handshake ACK || From 8eab33dad32d29fa10b618312b995eaf7c329e12 Mon Sep 17 00:00:00 2001 From: ianswett Date: Tue, 3 Sep 2019 18:58:21 -0400 Subject: [PATCH 14/24] Update draft-ietf-quic-recovery.md --- draft-ietf-quic-recovery.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/draft-ietf-quic-recovery.md b/draft-ietf-quic-recovery.md index b8de19b4b4..52ce911afe 100644 --- a/draft-ietf-quic-recovery.md +++ b/draft-ietf-quic-recovery.md @@ -1193,7 +1193,8 @@ SetLossDetectionTimer(): // Cancel the timer if there are no ack-eliciting packets // in flight and the endpoint is a server. Do not cancel the - // timer until the client has received a Handshake or 1-RTT ACK. + // timer until the client has received an acknowledgement that + // indicates the server has validated the path. if (no ack-eliciting packets in flight && (endpoint is server || has received Handshake ACK || From 4df749464d69b8239d173a2a183c0a7491436448 Mon Sep 17 00:00:00 2001 From: ianswett Date: Tue, 3 Sep 2019 19:04:16 -0400 Subject: [PATCH 15/24] Update draft-ietf-quic-recovery.md Co-Authored-By: Jana Iyengar --- draft-ietf-quic-recovery.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/draft-ietf-quic-recovery.md b/draft-ietf-quic-recovery.md index 52ce911afe..9b322b8550 100644 --- a/draft-ietf-quic-recovery.md +++ b/draft-ietf-quic-recovery.md @@ -1192,7 +1192,7 @@ SetLossDetectionTimer(): return // Cancel the timer if there are no ack-eliciting packets - // in flight and the endpoint is a server. Do not cancel the + // in flight, with the following exception. Do not cancel the // timer until the client has received an acknowledgement that // indicates the server has validated the path. if (no ack-eliciting packets in flight && From 04ac7b29c94e168a4bc7589420d1038a709ed876 Mon Sep 17 00:00:00 2001 From: ianswett Date: Tue, 3 Sep 2019 19:04:27 -0400 Subject: [PATCH 16/24] Update draft-ietf-quic-recovery.md Co-Authored-By: Jana Iyengar --- draft-ietf-quic-recovery.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/draft-ietf-quic-recovery.md b/draft-ietf-quic-recovery.md index 9b322b8550..60b7062689 100644 --- a/draft-ietf-quic-recovery.md +++ b/draft-ietf-quic-recovery.md @@ -1193,7 +1193,7 @@ SetLossDetectionTimer(): // Cancel the timer if there are no ack-eliciting packets // in flight, with the following exception. Do not cancel the - // timer until the client has received an acknowledgement that + // timer at a client until the client has received an acknowledgement that // indicates the server has validated the path. if (no ack-eliciting packets in flight && (endpoint is server || From 9f0d6eccdc61b7d4e45d64356b69a75f01e452bc Mon Sep 17 00:00:00 2001 From: ianswett Date: Tue, 3 Sep 2019 19:06:55 -0400 Subject: [PATCH 17/24] Update draft-ietf-quic-recovery.md Co-Authored-By: Jana Iyengar --- draft-ietf-quic-recovery.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/draft-ietf-quic-recovery.md b/draft-ietf-quic-recovery.md index 60b7062689..79a4c43e3e 100644 --- a/draft-ietf-quic-recovery.md +++ b/draft-ietf-quic-recovery.md @@ -1193,7 +1193,7 @@ SetLossDetectionTimer(): // Cancel the timer if there are no ack-eliciting packets // in flight, with the following exception. Do not cancel the - // timer at a client until the client has received an acknowledgement that + // timer at a client until it has received an acknowledgement that // indicates the server has validated the path. if (no ack-eliciting packets in flight && (endpoint is server || From 26119bd0403ead534f6bc303df56559b16e49abf Mon Sep 17 00:00:00 2001 From: ianswett Date: Tue, 3 Sep 2019 19:12:38 -0400 Subject: [PATCH 18/24] Update draft-ietf-quic-recovery.md --- draft-ietf-quic-recovery.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/draft-ietf-quic-recovery.md b/draft-ietf-quic-recovery.md index 79a4c43e3e..ed06f9bdba 100644 --- a/draft-ietf-quic-recovery.md +++ b/draft-ietf-quic-recovery.md @@ -1192,9 +1192,9 @@ SetLossDetectionTimer(): return // Cancel the timer if there are no ack-eliciting packets - // in flight, with the following exception. Do not cancel the - // timer at a client until it has received an acknowledgement that - // indicates the server has validated the path. + // in flight, with the following exception: Do not cancel the + // timer at a client until it has received an acknowledgement + // indicating the server has completed address validation. if (no ack-eliciting packets in flight && (endpoint is server || has received Handshake ACK || From ec34d084545d8831abf6d5f89c09f4bc0d8be911 Mon Sep 17 00:00:00 2001 From: ianswett Date: Tue, 3 Sep 2019 20:20:11 -0400 Subject: [PATCH 19/24] Add PeerAwaitingAddressValidation --- draft-ietf-quic-recovery.md | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/draft-ietf-quic-recovery.md b/draft-ietf-quic-recovery.md index ed06f9bdba..79da9bf95f 100644 --- a/draft-ietf-quic-recovery.md +++ b/draft-ietf-quic-recovery.md @@ -1184,6 +1184,11 @@ GetEarliestLossTime(): space = pn_space return time, space +PeerAwaitingAddressValidation(): + return endpoint is client && + !(has received Handshake ACK || + has received 1-RTT ACK) + SetLossDetectionTimer(): loss_time, _ = GetEarliestLossTime() if (loss_time != 0): @@ -1191,14 +1196,8 @@ SetLossDetectionTimer(): loss_detection_timer.update(loss_time) return - // Cancel the timer if there are no ack-eliciting packets - // in flight, with the following exception: Do not cancel the - // timer at a client until it has received an acknowledgement - // indicating the server has completed address validation. if (no ack-eliciting packets in flight && - (endpoint is server || - has received Handshake ACK || - has received 1-RTT ACK)): + !PeerAwaitingAddressValidation()): loss_detection_timer.cancel() return From e8e778cb0cbd934132d6be4e8e316f4ef7c7b970 Mon Sep 17 00:00:00 2001 From: ianswett Date: Tue, 3 Sep 2019 21:13:19 -0400 Subject: [PATCH 20/24] Update draft-ietf-quic-recovery.md Co-Authored-By: Jana Iyengar --- draft-ietf-quic-recovery.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/draft-ietf-quic-recovery.md b/draft-ietf-quic-recovery.md index 79da9bf95f..195d863d52 100644 --- a/draft-ietf-quic-recovery.md +++ b/draft-ietf-quic-recovery.md @@ -1184,7 +1184,7 @@ GetEarliestLossTime(): space = pn_space return time, space -PeerAwaitingAddressValidation(): +IsPeerAwaitingAddressValidation(): return endpoint is client && !(has received Handshake ACK || has received 1-RTT ACK) From d0b5498f344d7e60e94cfcb9637c356f6474e9d7 Mon Sep 17 00:00:00 2001 From: ianswett Date: Tue, 3 Sep 2019 21:13:34 -0400 Subject: [PATCH 21/24] Update draft-ietf-quic-recovery.md Co-Authored-By: Jana Iyengar --- draft-ietf-quic-recovery.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/draft-ietf-quic-recovery.md b/draft-ietf-quic-recovery.md index 195d863d52..155a439f92 100644 --- a/draft-ietf-quic-recovery.md +++ b/draft-ietf-quic-recovery.md @@ -1197,7 +1197,7 @@ SetLossDetectionTimer(): return if (no ack-eliciting packets in flight && - !PeerAwaitingAddressValidation()): + !IsPeerAwaitingAddressValidation()): loss_detection_timer.cancel() return From c212dfdf7e7b48481f488fe3c96e207d814f8180 Mon Sep 17 00:00:00 2001 From: ianswett Date: Tue, 3 Sep 2019 21:31:46 -0400 Subject: [PATCH 22/24] Some of MT's suggestions --- draft-ietf-quic-recovery.md | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/draft-ietf-quic-recovery.md b/draft-ietf-quic-recovery.md index 155a439f92..73e045ac4b 100644 --- a/draft-ietf-quic-recovery.md +++ b/draft-ietf-quic-recovery.md @@ -1182,11 +1182,15 @@ GetEarliestLossTime(): (time == 0 || loss_time[pn_space] < time)): time = loss_time[pn_space]; space = pn_space - return time, space - -IsPeerAwaitingAddressValidation(): - return endpoint is client && - !(has received Handshake ACK || + return time, space + +PeerIsAwaitingAddressValidation(): + # Assume clients validate the server's address implicitly. + if (endpoint is server): + return false + # Servers complete address validation when a + # protected packet is received. + return !(has received Handshake ACK || has received 1-RTT ACK) SetLossDetectionTimer(): @@ -1197,7 +1201,7 @@ SetLossDetectionTimer(): return if (no ack-eliciting packets in flight && - !IsPeerAwaitingAddressValidation()): + PeerIsAwaitingAddressValidation()): loss_detection_timer.cancel() return From 92b5fd76dc8b7dc38f217ae1a6ba633a7af0d7f3 Mon Sep 17 00:00:00 2001 From: ianswett Date: Tue, 3 Sep 2019 21:33:39 -0400 Subject: [PATCH 23/24] Update draft-ietf-quic-recovery.md --- draft-ietf-quic-recovery.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/draft-ietf-quic-recovery.md b/draft-ietf-quic-recovery.md index 73e045ac4b..56d971aa4d 100644 --- a/draft-ietf-quic-recovery.md +++ b/draft-ietf-quic-recovery.md @@ -1184,14 +1184,14 @@ GetEarliestLossTime(): space = pn_space return time, space -PeerIsAwaitingAddressValidation(): +PeerNotAwaitingAddressValidation(): # Assume clients validate the server's address implicitly. if (endpoint is server): - return false + return true # Servers complete address validation when a # protected packet is received. - return !(has received Handshake ACK || - has received 1-RTT ACK) + return has received Handshake ACK || + has received 1-RTT ACK SetLossDetectionTimer(): loss_time, _ = GetEarliestLossTime() @@ -1201,7 +1201,7 @@ SetLossDetectionTimer(): return if (no ack-eliciting packets in flight && - PeerIsAwaitingAddressValidation()): + PeerNotAwaitingAddressValidation()): loss_detection_timer.cancel() return From d55a15304192ed4456ee6eba0b6ce2ab6dfaf0f4 Mon Sep 17 00:00:00 2001 From: ianswett Date: Tue, 3 Sep 2019 21:38:45 -0400 Subject: [PATCH 24/24] Update draft-ietf-quic-recovery.md --- draft-ietf-quic-recovery.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/draft-ietf-quic-recovery.md b/draft-ietf-quic-recovery.md index 56d971aa4d..f99b6e52f0 100644 --- a/draft-ietf-quic-recovery.md +++ b/draft-ietf-quic-recovery.md @@ -1182,8 +1182,8 @@ GetEarliestLossTime(): (time == 0 || loss_time[pn_space] < time)): time = loss_time[pn_space]; space = pn_space - return time, space - + return time, space + PeerNotAwaitingAddressValidation(): # Assume clients validate the server's address implicitly. if (endpoint is server):