Pad ack-eliciting initial-bearing datagrams from servers

Quoth the spec: a server MUST expand the payload of all UDP datagrams
carrying ack-eliciting Initial packets to at least the smallest
allowed maximum datagram size of 1200 bytes.
This commit is contained in:
Benjamin Saunders
2021-03-02 22:51:50 -08:00
committed by Dirkjan Ochtman
parent 9287a34d63
commit b7e95fdba7
+3 -1
View File
@@ -636,7 +636,9 @@ where
)?);
coalesce = coalesce && !builder.short_header;
pad_datagram |= space_id == SpaceId::Initial && self.side.is_client();
// https://tools.ietf.org/html/draft-ietf-quic-transport-34#section-14.1
pad_datagram |=
space_id == SpaceId::Initial && (self.side.is_client() || ack_eliciting);
if close {
trace!("sending CONNECTION_CLOSE");