diff --git a/src/conn_state.rs b/src/conn_state.rs index 85ce40ca2..eb4702da3 100644 --- a/src/conn_state.rs +++ b/src/conn_state.rs @@ -29,6 +29,7 @@ pub struct ConnectionState { control: VecDeque, tls: T, pmtu: usize, + version: u32, } impl ConnectionState @@ -77,6 +78,7 @@ where queue: VecDeque::new(), control: VecDeque::new(), pmtu: IPV6_MIN_MTU, + version: QUIC_VERSION, } } @@ -171,7 +173,7 @@ where let header = match ptype { Some(ltype) => Header::Long { ptype: ltype, - version: QUIC_VERSION, + version: self.version, dst_cid, src_cid, len: (payload_len + tag_len) as u64,