From 702949dcde53857d5bf0fc8d94366c5bd291b00a Mon Sep 17 00:00:00 2001 From: Lars Eggert Date: Mon, 14 Oct 2024 10:28:34 +0200 Subject: [PATCH] feat: No zero-len CIDs for client They break the upcoming QNS migration tests. --- neqo-bin/src/client/http09.rs | 4 ++-- neqo-bin/src/client/http3.rs | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/neqo-bin/src/client/http09.rs b/neqo-bin/src/client/http09.rs index 2f31928058..1fe9d8fa14 100644 --- a/neqo-bin/src/client/http09.rs +++ b/neqo-bin/src/client/http09.rs @@ -20,7 +20,7 @@ use std::{ use neqo_common::{event::Provider, qdebug, qinfo, qwarn, Datagram}; use neqo_crypto::{AuthenticationStatus, ResumptionToken}; use neqo_transport::{ - CloseReason, Connection, ConnectionEvent, EmptyConnectionIdGenerator, Error, Output, State, + CloseReason, Connection, ConnectionEvent, Error, Output, RandomConnectionIdGenerator, State, StreamId, StreamType, }; use url::Url; @@ -137,7 +137,7 @@ pub fn create_client( let mut client = Connection::new_client( hostname, &[alpn], - Rc::new(RefCell::new(EmptyConnectionIdGenerator::default())), + Rc::new(RefCell::new(RandomConnectionIdGenerator::new(10))), local_addr, remote_addr, args.shared.quic_parameters.get(alpn), diff --git a/neqo-bin/src/client/http3.rs b/neqo-bin/src/client/http3.rs index 0413338672..9c702e2e81 100644 --- a/neqo-bin/src/client/http3.rs +++ b/neqo-bin/src/client/http3.rs @@ -22,8 +22,8 @@ use neqo_common::{event::Provider, hex, qdebug, qinfo, qwarn, Datagram, Header}; use neqo_crypto::{AuthenticationStatus, ResumptionToken}; use neqo_http3::{Error, Http3Client, Http3ClientEvent, Http3Parameters, Http3State, Priority}; use neqo_transport::{ - AppError, CloseReason, Connection, EmptyConnectionIdGenerator, Error as TransportError, Output, - StreamId, + AppError, CloseReason, Connection, Error as TransportError, Output, + RandomConnectionIdGenerator, StreamId, }; use url::Url; @@ -72,7 +72,7 @@ pub fn create_client( let mut transport = Connection::new_client( hostname, &[&args.shared.alpn], - Rc::new(RefCell::new(EmptyConnectionIdGenerator::default())), + Rc::new(RefCell::new(RandomConnectionIdGenerator::new(10))), local_addr, remote_addr, args.shared.quic_parameters.get(args.shared.alpn.as_str()),