Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit dfbcdde5 authored by Mike Yu's avatar Mike Yu
Browse files

DoH: Handle connection draining state

When a CONNECTION_CLOSE frame is received, the connection enters
draining state (RFC 9000 section 10.2.2). When in draining state,
no more packets can be sent. So the DoH client needs to initiate
a new connection if necessary; otherwise, subsequent DNS requests
might fail.

As a connection enters draining state upon a CONNECTION_CLOSE
frame is received, DNS packets sent prior to the frame received
might fail. For example, in Quiche (version 0.9.0) implementation,
the DoH client can send some DNS packets out on the same
connection after predefined max_idle_timeout seconds (55 seconds)
because of large Probe Timeout (RFC 9002 section 6.2). It might
lead to the DoH server responding with a CONNECTION_CLOSE frame,
and result in those DNS queries failed.

Bug: 215818810
Test: cd packages/modules/DnsResolver && atest
Test: manual test (see bug 215818810 comment#2)
      verified that the DoH client can create a new connection for
      subsequent DNS requests after detecting a connection being
      draining state.
Change-Id: Ibd1667aeb9e1528776392e6f91ddb13b66637f33
parent f4fa285d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment