Repository navigation
Commit 07216e1
committed
Don't back off on a DTLS 1.3 quick timeout with nothing to retransmit
Dtls13RtxTimeout cleared dtls13FastTimeout when it sent the pending ACKs
and only then checked the flag to decide whether this was the quick
timeout. Whenever ACKs could be sent, the quick timeout fell through to
the long timeout path and doubled the retransmission timeout. While a
peer flight arrives in parts our own flight is already acknowledged and
nothing is buffered, so each quick timeout doubled the timeout without
retransmitting anything, and repeated losses could drive it to its
maximum. Once at the maximum, the quick timeout failed the handshake
while the peer was still sending its flight.
Return after the ACKs when the timeout was a quick one and nothing is
buffered for retransmission. With records buffered the behaviour stays
as before, so callers that wait the full timeout before calling
wolfSSL_dtls_got_timeout still retransmit. A timeout taken while the
flag is clear still backs off with nothing buffered, so a handshake with
a lost peer still ends. A caller that waits the full timeout while the
flag is set skips the backoff once, and the next timeout backs off.1 parent bd5eead commit 07216e1
3 files changed
Lines changed: 85 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3468 | 3468 | | |
3469 | 3469 | | |
3470 | 3470 | | |
| 3471 | + | |
3471 | 3472 | | |
3472 | 3473 | | |
3473 | 3474 | | |
| |||
3493 | 3494 | | |
3494 | 3495 | | |
3495 | 3496 | | |
| 3497 | + | |
| 3498 | + | |
| 3499 | + | |
3496 | 3500 | | |
3497 | 3501 | | |
3498 | 3502 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2999 | 2999 | | |
3000 | 3000 | | |
3001 | 3001 | | |
| 3002 | + | |
| 3003 | + | |
| 3004 | + | |
| 3005 | + | |
| 3006 | + | |
| 3007 | + | |
| 3008 | + | |
| 3009 | + | |
| 3010 | + | |
| 3011 | + | |
| 3012 | + | |
| 3013 | + | |
| 3014 | + | |
| 3015 | + | |
| 3016 | + | |
| 3017 | + | |
| 3018 | + | |
| 3019 | + | |
| 3020 | + | |
| 3021 | + | |
| 3022 | + | |
| 3023 | + | |
| 3024 | + | |
| 3025 | + | |
| 3026 | + | |
| 3027 | + | |
| 3028 | + | |
| 3029 | + | |
| 3030 | + | |
| 3031 | + | |
| 3032 | + | |
| 3033 | + | |
| 3034 | + | |
| 3035 | + | |
| 3036 | + | |
| 3037 | + | |
| 3038 | + | |
| 3039 | + | |
| 3040 | + | |
| 3041 | + | |
| 3042 | + | |
| 3043 | + | |
| 3044 | + | |
| 3045 | + | |
| 3046 | + | |
| 3047 | + | |
| 3048 | + | |
| 3049 | + | |
| 3050 | + | |
| 3051 | + | |
| 3052 | + | |
| 3053 | + | |
| 3054 | + | |
| 3055 | + | |
| 3056 | + | |
| 3057 | + | |
| 3058 | + | |
| 3059 | + | |
| 3060 | + | |
| 3061 | + | |
| 3062 | + | |
| 3063 | + | |
| 3064 | + | |
| 3065 | + | |
| 3066 | + | |
| 3067 | + | |
| 3068 | + | |
| 3069 | + | |
| 3070 | + | |
| 3071 | + | |
| 3072 | + | |
| 3073 | + | |
| 3074 | + | |
| 3075 | + | |
| 3076 | + | |
| 3077 | + | |
| 3078 | + | |
| 3079 | + | |
| 3080 | + | |
3002 | 3081 | | |
3003 | 3082 | | |
3004 | 3083 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
| 59 | + | |
59 | 60 | | |
60 | 61 | | |
61 | 62 | | |
| |||
262 | 263 | | |
263 | 264 | | |
264 | 265 | | |
| 266 | + | |
265 | 267 | | |
266 | 268 | | |
267 | 269 | | |
| |||
0 commit comments