-
-
Notifications
You must be signed in to change notification settings - Fork 395
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incorrect max_idle_timeout
negotiation.
#2008
Comments
mstyura
changed the title
Behaviour of
Incorrect Oct 9, 2024
quinn
with TransportConfig::max_idle_timeout(cfg, Some(Duration::ZERO))
max_idle_timeout
negotiation.
mstyura
added a commit
to mstyura/quinn
that referenced
this issue
Oct 9, 2024
mstyura
added a commit
to mstyura/quinn
that referenced
this issue
Oct 9, 2024
mstyura
added a commit
to mstyura/quinn
that referenced
this issue
Oct 9, 2024
# This is the 1st commit message: quinn-rs#2008: Make max_idle_timeout negotiation commutative. # This is the commit message quinn-rs#2: quinn-rs#2008: Store negotiated idle_timeout as Duration. # This is the commit message quinn-rs#3: quinn-rs#2009: Address code review feedback.
mstyura
added a commit
to mstyura/quinn
that referenced
this issue
Oct 9, 2024
mstyura
added a commit
to mstyura/quinn
that referenced
this issue
Oct 9, 2024
Ensure that both endpoints can agree on the same idle_timeout value, regardless of the announced max_idle_timeout parameters. This fix addresses a corner case where a locally configured idle_timeout of 0 was used as the negotiated value instead of the non-zero max_idle_timeout provided by the remote side.
github-merge-queue bot
pushed a commit
that referenced
this issue
Oct 11, 2024
Ensure that both endpoints can agree on the same idle_timeout value, regardless of the announced max_idle_timeout parameters. This fix addresses a corner case where a locally configured idle_timeout of 0 was used as the negotiated value instead of the non-zero max_idle_timeout provided by the remote side.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Steps to reproduce
max_idle_timeout
toDuration::ZERO
max_idle_timeout
some some value, e.g. 180 seconds. During handshake client side will omitmax_idle_timeout
parameter inside TLS handshake to server which seems to correspond to this code:quinn/quinn-proto/src/transport_parameters.rs
Lines 36 to 37 in 15a4dce
Actual result
Quinn on server side will negotiate
idle_timeout
to be180
seconds because not value from client received, but client side connection will actually computeidle_timeout
to be0
:quinn/quinn-proto/src/connection/mod.rs
Lines 3293 to 3298 in 15a4dce
effectively falling back to
3 * PTO
timeout:quinn/quinn-proto/src/connection/mod.rs
Lines 1845 to 1856 in 15a4dce
Due to low effective idle timeout connection is frequently locally closed and need to be re-established.
Expected result
I'd expect that both sides agree on the same value of
max_idle_timeout
so in case local side configured with0
timeout and peer side have non-zero idle timeout configured both endpoints will use same non-zero idle timeout.This expectation seems to match the RFC where
0
value is threaten as disabled timeout according to section 18.2 which already respected while writing transport parameters to wire format.And according to section 10.1 during negotiation in case of only one side have enabled
max_idle_timeout
both endpoints must negotiate to the value provided by other side.The text was updated successfully, but these errors were encountered: