Commit e67836b
committed
Fix what review found in the per-path probe
Six things, from a review of the branch.
QuicPacketBuilderCleanup was called without QuicPacketBuilderFinalize in
two branches, and it opens with CXPLAT_DBG_ASSERT(SendData == NULL). By
then QuicPacketBuilderPrepareForPathMtuDiscovery has succeeded, so
SendData is live: the assert fires in debug and the send data and its
datagram leak in release. The truncation branch is reachable rather than
theoretical -- a peer advertising the RFC-legal minimum
max_udp_payload_size of 1200 takes it on the first probe of every
connection, and since no packet is sent nothing re-arms the probe, so that
path's discovery is dead for the connection's life. Finalize handles a
packet with no frames exactly right, undoing the header and rolling the
packet number back, so it is the one-line fix both branches wanted.
MTU probes stopped being congestion controlled. QUIC_CONN_SEND_FLAG_DPLPMTUD
is not in QUIC_CONN_SEND_FLAGS_BYPASS_CC, so while these were built in the
send loop a full cwnd deferred them. Building them per path skipped that:
only Path->Allowance, the amplification limit, was checked, and a full-size
ack-eliciting probe went out over cwnd and into BytesInFlight. RFC 8899
wants these congestion controlled. QuicPacketBuilderHasAllowance is checked
once the builder is initialized, which is where SendAllowance is set.
A probe skipped for the amplification limit lost its flag while keeping
its per-path bit. Under the old design the flag and the state were the same
thing so nothing was lost; now nothing re-arms it -- no packet was sent, so
loss detection has nothing to discard, and the search-complete timeout only
looks at finished searches. The flag goes back up, as it already does when
the route is not ready.
QUIC_PARAM_CONN_LOCAL_ADDRESS was missing the Paths[0] exemption that
QuicConnActivatePath has and that the documentation states. Paths[0]
reaches that branch not active whenever the peer has sent PATH_BACKUP, so
an application naming its local address was refused while ACTIVATE_PATH for
the same address succeeded.
loss_detection.c dereferenced PathID->Path without a null check on the
lines this branch already touches. A QUIC_PATHID outlives its QUIC_PATH, so
a status frame still in flight when its path is removed reaches here;
connection.c guards its own uses the same way.
docs/Settings.md and the comment above QuicConnPathMeetsRequiredDatagramLength
still said a held-back path is never probed and can never improve. That was
true of P2 and is what P3 removes. An application following the old text
would pick a needlessly small requirement.
Not covered by a test: the truncation branch. The advertised
max_udp_payload_size comes from the socket's local MTU, which is 65536 on
loopback, so no test peer can advertise a value low enough to reach it.1 parent 2fdd87e commit e67836b
4 files changed
Lines changed: 58 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
235 | 235 | | |
236 | 236 | | |
237 | 237 | | |
238 | | - | |
| 238 | + | |
239 | 239 | | |
240 | 240 | | |
241 | 241 | | |
242 | | - | |
| 242 | + | |
243 | 243 | | |
244 | 244 | | |
245 | 245 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7633 | 7633 | | |
7634 | 7634 | | |
7635 | 7635 | | |
7636 | | - | |
7637 | | - | |
7638 | | - | |
7639 | | - | |
7640 | | - | |
| 7636 | + | |
| 7637 | + | |
| 7638 | + | |
| 7639 | + | |
| 7640 | + | |
7641 | 7641 | | |
7642 | 7642 | | |
7643 | 7643 | | |
| |||
8478 | 8478 | | |
8479 | 8479 | | |
8480 | 8480 | | |
8481 | | - | |
| 8481 | + | |
| 8482 | + | |
| 8483 | + | |
| 8484 | + | |
| 8485 | + | |
| 8486 | + | |
| 8487 | + | |
| 8488 | + | |
8482 | 8489 | | |
8483 | 8490 | | |
8484 | 8491 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
981 | 981 | | |
982 | 982 | | |
983 | 983 | | |
984 | | - | |
| 984 | + | |
| 985 | + | |
| 986 | + | |
| 987 | + | |
| 988 | + | |
| 989 | + | |
| 990 | + | |
985 | 991 | | |
986 | 992 | | |
987 | 993 | | |
| |||
1007 | 1013 | | |
1008 | 1014 | | |
1009 | 1015 | | |
1010 | | - | |
| 1016 | + | |
| 1017 | + | |
| 1018 | + | |
| 1019 | + | |
| 1020 | + | |
| 1021 | + | |
| 1022 | + | |
1011 | 1023 | | |
1012 | 1024 | | |
1013 | 1025 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1542 | 1542 | | |
1543 | 1543 | | |
1544 | 1544 | | |
1545 | | - | |
1546 | | - | |
| 1545 | + | |
| 1546 | + | |
| 1547 | + | |
| 1548 | + | |
| 1549 | + | |
| 1550 | + | |
| 1551 | + | |
| 1552 | + | |
| 1553 | + | |
| 1554 | + | |
| 1555 | + | |
| 1556 | + | |
| 1557 | + | |
| 1558 | + | |
1547 | 1559 | | |
1548 | 1560 | | |
1549 | 1561 | | |
| |||
1573 | 1585 | | |
1574 | 1586 | | |
1575 | 1587 | | |
| 1588 | + | |
| 1589 | + | |
| 1590 | + | |
| 1591 | + | |
| 1592 | + | |
| 1593 | + | |
| 1594 | + | |
| 1595 | + | |
| 1596 | + | |
| 1597 | + | |
| 1598 | + | |
| 1599 | + | |
| 1600 | + | |
1576 | 1601 | | |
1577 | 1602 | | |
1578 | 1603 | | |
| |||
1597 | 1622 | | |
1598 | 1623 | | |
1599 | 1624 | | |
| 1625 | + | |
1600 | 1626 | | |
1601 | 1627 | | |
1602 | 1628 | | |
| |||
1637 | 1663 | | |
1638 | 1664 | | |
1639 | 1665 | | |
| 1666 | + | |
1640 | 1667 | | |
1641 | 1668 | | |
1642 | 1669 | | |
| |||
0 commit comments