Loading doh/tests/doh_frontend/src/client.rs +2 −1 Original line number Diff line number Diff line Loading @@ -152,8 +152,9 @@ impl Client { if let Some(send_reset_stream) = send_reset_stream { if send_reset_stream == stream_id { // Terminate the stream with an error code 99. self.conn.stream_shutdown(stream_id, quiche::Shutdown::Write, 99)?; info!("Preparing RESET_FRAME on stream {}", stream_id); info!("Preparing RESET_STREAM on stream {}", stream_id); return Ok(()); } } Loading tests/doh_frontend.cpp +6 −12 Original line number Diff line number Diff line Loading @@ -62,8 +62,7 @@ bool DohFrontend::stopServer() { std::lock_guard guard(mMutex); if (!mRustDoh) return false; rust::frontend_stop(mRustDoh); return true; return rust::frontend_stop(mRustDoh); } int DohFrontend::queries() const { Loading Loading @@ -130,40 +129,35 @@ bool DohFrontend::setMaxIdleTimeout(uint64_t value) { std::lock_guard guard(mMutex); if (!mRustDoh) return false; frontend_set_max_idle_timeout(mRustDoh, value); return true; return frontend_set_max_idle_timeout(mRustDoh, value); } bool DohFrontend::setMaxBufferSize(uint64_t value) { std::lock_guard guard(mMutex); if (!mRustDoh) return false; frontend_set_max_buffer_size(mRustDoh, value); return true; return frontend_set_max_buffer_size(mRustDoh, value); } bool DohFrontend::setMaxStreamsBidi(uint64_t value) { std::lock_guard guard(mMutex); if (!mRustDoh) return false; frontend_set_max_streams_bidi(mRustDoh, value); return true; return frontend_set_max_streams_bidi(mRustDoh, value); } bool DohFrontend::block_sending(bool block) { std::lock_guard guard(mMutex); if (!mRustDoh) return false; frontend_block_sending(mRustDoh, block); return true; return frontend_block_sending(mRustDoh, block); } bool DohFrontend::setResetStreamId(uint64_t value) { std::lock_guard guard(mMutex); if (!mRustDoh) return false; frontend_set_reset_stream_id(mRustDoh, value); return true; return frontend_set_reset_stream_id(mRustDoh, value); } bool DohFrontend::waitForAllClientsDisconnected() const { Loading tests/resolv_private_dns_test.cpp +3 −1 Original line number Diff line number Diff line Loading @@ -1177,7 +1177,9 @@ TEST_F(PrivateDnsDohTest, ReceiveResetStream) { doh.clearQueries(); dns.clearQueries(); // The stream 0 has been used for DoH probe. The stream for the next DoH query will be 4. // DnsResolver uses bidirectional streams for DoH queries (See // RFC9000#name-stream-types-and-identifier), and stream 0 has been used for DoH probe, so // the next stream for the next DoH query will be 4. EXPECT_TRUE(doh.setResetStreamId(4)); // Send a DNS request. The DoH query will be sent on stream 4 and fail. Loading Loading
doh/tests/doh_frontend/src/client.rs +2 −1 Original line number Diff line number Diff line Loading @@ -152,8 +152,9 @@ impl Client { if let Some(send_reset_stream) = send_reset_stream { if send_reset_stream == stream_id { // Terminate the stream with an error code 99. self.conn.stream_shutdown(stream_id, quiche::Shutdown::Write, 99)?; info!("Preparing RESET_FRAME on stream {}", stream_id); info!("Preparing RESET_STREAM on stream {}", stream_id); return Ok(()); } } Loading
tests/doh_frontend.cpp +6 −12 Original line number Diff line number Diff line Loading @@ -62,8 +62,7 @@ bool DohFrontend::stopServer() { std::lock_guard guard(mMutex); if (!mRustDoh) return false; rust::frontend_stop(mRustDoh); return true; return rust::frontend_stop(mRustDoh); } int DohFrontend::queries() const { Loading Loading @@ -130,40 +129,35 @@ bool DohFrontend::setMaxIdleTimeout(uint64_t value) { std::lock_guard guard(mMutex); if (!mRustDoh) return false; frontend_set_max_idle_timeout(mRustDoh, value); return true; return frontend_set_max_idle_timeout(mRustDoh, value); } bool DohFrontend::setMaxBufferSize(uint64_t value) { std::lock_guard guard(mMutex); if (!mRustDoh) return false; frontend_set_max_buffer_size(mRustDoh, value); return true; return frontend_set_max_buffer_size(mRustDoh, value); } bool DohFrontend::setMaxStreamsBidi(uint64_t value) { std::lock_guard guard(mMutex); if (!mRustDoh) return false; frontend_set_max_streams_bidi(mRustDoh, value); return true; return frontend_set_max_streams_bidi(mRustDoh, value); } bool DohFrontend::block_sending(bool block) { std::lock_guard guard(mMutex); if (!mRustDoh) return false; frontend_block_sending(mRustDoh, block); return true; return frontend_block_sending(mRustDoh, block); } bool DohFrontend::setResetStreamId(uint64_t value) { std::lock_guard guard(mMutex); if (!mRustDoh) return false; frontend_set_reset_stream_id(mRustDoh, value); return true; return frontend_set_reset_stream_id(mRustDoh, value); } bool DohFrontend::waitForAllClientsDisconnected() const { Loading
tests/resolv_private_dns_test.cpp +3 −1 Original line number Diff line number Diff line Loading @@ -1177,7 +1177,9 @@ TEST_F(PrivateDnsDohTest, ReceiveResetStream) { doh.clearQueries(); dns.clearQueries(); // The stream 0 has been used for DoH probe. The stream for the next DoH query will be 4. // DnsResolver uses bidirectional streams for DoH queries (See // RFC9000#name-stream-types-and-identifier), and stream 0 has been used for DoH probe, so // the next stream for the next DoH query will be 4. EXPECT_TRUE(doh.setResetStreamId(4)); // Send a DNS request. The DoH query will be sent on stream 4 and fail. Loading