@@ -9,7 +9,7 @@ use crate::{
99 stream:: TransportFeatures ,
1010} ;
1111use core:: fmt;
12- use s2n_quic_core:: { dc, time} ;
12+ use s2n_quic_core:: { dc, time, varint :: VarInt } ;
1313use std:: { net:: SocketAddr , sync:: Arc } ;
1414
1515mod cleaner;
@@ -143,23 +143,29 @@ impl Map {
143143 pub fn open_once (
144144 & self ,
145145 credentials : & Credentials ,
146+ queue_id : Option < VarInt > ,
146147 control_out : & mut Vec < u8 > ,
147148 ) -> Option < open:: Once > {
148- let entry = self . store . pre_authentication ( credentials, control_out) ?;
149- let opener = entry. uni_opener ( self . clone ( ) , credentials) ;
149+ let entry = self
150+ . store
151+ . pre_authentication ( credentials, queue_id, control_out) ?;
152+ let opener = entry. uni_opener ( self . clone ( ) , credentials, queue_id) ;
150153 Some ( opener)
151154 }
152155
153156 pub fn pair_for_credentials (
154157 & self ,
155158 credentials : & Credentials ,
159+ queue_id : Option < VarInt > ,
156160 features : & TransportFeatures ,
157161 control_out : & mut Vec < u8 > ,
158162 ) -> Option < ( entry:: Bidirectional , dc:: ApplicationParams ) > {
159- let entry = self . store . pre_authentication ( credentials, control_out) ?;
163+ let entry = self
164+ . store
165+ . pre_authentication ( credentials, queue_id, control_out) ?;
160166
161167 let params = entry. parameters ( ) ;
162- let keys = entry. bidi_remote ( self . clone ( ) , credentials, features) ;
168+ let keys = entry. bidi_remote ( self . clone ( ) , credentials, queue_id , features) ;
163169
164170 Some ( ( keys, params) )
165171 }
@@ -173,7 +179,41 @@ impl Map {
173179 }
174180
175181 pub fn handle_control_packet ( & self , packet : & control:: Packet , peer : & SocketAddr ) {
176- self . store . handle_control_packet ( packet, peer)
182+ match packet {
183+ control:: Packet :: StaleKey ( packet) => {
184+ let _ = self . handle_stale_key_packet ( packet, peer) ;
185+ }
186+ control:: Packet :: ReplayDetected ( packet) => {
187+ let _ = self . handle_replay_detected_packet ( packet, peer) ;
188+ }
189+ control:: Packet :: UnknownPathSecret ( packet) => {
190+ let _ = self . handle_unknown_path_secret_packet ( packet, peer) ;
191+ }
192+ }
193+ }
194+
195+ pub fn handle_stale_key_packet < ' a > (
196+ & self ,
197+ packet : & ' a control:: stale_key:: Packet ,
198+ peer : & SocketAddr ,
199+ ) -> Option < & ' a control:: StaleKey > {
200+ self . store . handle_stale_key_packet ( packet, peer)
201+ }
202+
203+ pub fn handle_replay_detected_packet < ' a > (
204+ & self ,
205+ packet : & ' a control:: replay_detected:: Packet ,
206+ peer : & SocketAddr ,
207+ ) -> Option < & ' a control:: ReplayDetected > {
208+ self . store . handle_replay_detected_packet ( packet, peer)
209+ }
210+
211+ pub fn handle_unknown_path_secret_packet < ' a > (
212+ & self ,
213+ packet : & ' a control:: unknown_path_secret:: Packet ,
214+ peer : & SocketAddr ,
215+ ) -> Option < & ' a control:: UnknownPathSecret > {
216+ self . store . handle_unknown_path_secret_packet ( packet, peer)
177217 }
178218
179219 #[ doc( hidden) ]
0 commit comments