@@ -1311,7 +1311,7 @@ static int quic_crypto_data_cpy(struct quic_conn *qc, struct quic_enc_level *qel
13111311 goto leave ;
13121312 }
13131313
1314- frm -> crypto .offset = cf_offset ;
1314+ frm -> crypto .offset_node . key = cf_offset ;
13151315 frm -> crypto .len = cf_len ;
13161316 frm -> crypto .qel = qel ;
13171317 LIST_APPEND (& qel -> pktns -> tx .frms , & frm -> list );
@@ -3023,7 +3023,7 @@ static enum quic_rx_ret_frm qc_handle_crypto_frm(struct quic_conn *qc,
30233023 enum quic_rx_ret_frm ret = QUIC_RX_RET_FRM_DONE ;
30243024 /* XXX TO DO: <cfdebug> is used only for the traces. */
30253025 struct quic_rx_crypto_frm cfdebug = {
3026- .offset_node .key = crypto_frm -> offset ,
3026+ .offset_node .key = crypto_frm -> offset_node . key ,
30273027 .len = crypto_frm -> len ,
30283028 };
30293029 struct quic_cstream * cstream = qel -> cstream ;
@@ -3037,10 +3037,10 @@ static enum quic_rx_ret_frm qc_handle_crypto_frm(struct quic_conn *qc,
30373037 goto done ;
30383038 }
30393039
3040- if (unlikely (crypto_frm -> offset < cstream -> rx .offset )) {
3040+ if (unlikely (crypto_frm -> offset_node . key < cstream -> rx .offset )) {
30413041 size_t diff ;
30423042
3043- if (crypto_frm -> offset + crypto_frm -> len <= cstream -> rx .offset ) {
3043+ if (crypto_frm -> offset_node . key + crypto_frm -> len <= cstream -> rx .offset ) {
30443044 /* Nothing to do */
30453045 TRACE_PROTO ("Already received CRYPTO data" ,
30463046 QUIC_EV_CONN_RXPKT , qc , pkt , & cfdebug );
@@ -3051,13 +3051,13 @@ static enum quic_rx_ret_frm qc_handle_crypto_frm(struct quic_conn *qc,
30513051 TRACE_PROTO ("Partially already received CRYPTO data" ,
30523052 QUIC_EV_CONN_RXPKT , qc , pkt , & cfdebug );
30533053
3054- diff = cstream -> rx .offset - crypto_frm -> offset ;
3054+ diff = cstream -> rx .offset - crypto_frm -> offset_node . key ;
30553055 crypto_frm -> len -= diff ;
30563056 crypto_frm -> data += diff ;
3057- crypto_frm -> offset = cstream -> rx .offset ;
3057+ crypto_frm -> offset_node . key = cstream -> rx .offset ;
30583058 }
30593059
3060- if (crypto_frm -> offset == cstream -> rx .offset && ncb_is_empty (ncbuf )) {
3060+ if (crypto_frm -> offset_node . key == cstream -> rx .offset && ncb_is_empty (ncbuf )) {
30613061 if (!qc_provide_cdata (qel , qc -> xprt_ctx , crypto_frm -> data , crypto_frm -> len ,
30623062 pkt , & cfdebug )) {
30633063 // trace already emitted by function above
@@ -3076,7 +3076,7 @@ static enum quic_rx_ret_frm qc_handle_crypto_frm(struct quic_conn *qc,
30763076 }
30773077
30783078 /* crypto_frm->offset > cstream-trx.offset */
3079- off_rel = crypto_frm -> offset - cstream -> rx .offset ;
3079+ off_rel = crypto_frm -> offset_node . key - cstream -> rx .offset ;
30803080
30813081 /* RFC 9000 7.5. Cryptographic Message Buffering
30823082 *
@@ -3326,7 +3326,7 @@ static int qc_parse_pkt_frms(struct quic_conn *qc, struct quic_rx_packet *pkt,
33263326 break ;
33273327 }
33283328 case QUIC_FT_CRYPTO :
3329- frm -> crypto .offset_node .key = frm -> crypto .offset ;
3329+ frm -> crypto .offset_node .key = frm -> crypto .offset_node . key ;
33303330 eb64_insert (& cf_frms_tree , & frm -> crypto .offset_node );
33313331 frm = NULL ;
33323332 break ;
@@ -7908,7 +7908,7 @@ static inline int qc_build_frms(struct list *outlist, struct list *inlist,
79087908 TRACE_DEVEL (" New CRYPTO frame build (room, len)" ,
79097909 QUIC_EV_CONN_BCFRMS , qc , & room , len );
79107910 /* Compute the length of this CRYPTO frame header */
7911- hlen = 1 + quic_int_getsize (cf -> crypto .offset );
7911+ hlen = 1 + quic_int_getsize (cf -> crypto .offset_node . key );
79127912 /* Compute the data length of this CRYPTO frame. */
79137913 dlen = max_stream_data_size (room , hlen , cf -> crypto .len );
79147914 TRACE_DEVEL (" CRYPTO data length (hlen, crypto.len, dlen)" ,
@@ -7940,7 +7940,7 @@ static inline int qc_build_frms(struct list *outlist, struct list *inlist,
79407940 }
79417941
79427942 new_cf -> crypto .len = dlen ;
7943- new_cf -> crypto .offset = cf -> crypto .offset ;
7943+ new_cf -> crypto .offset_node . key = cf -> crypto .offset_node . key ;
79447944 new_cf -> crypto .qel = qel ;
79457945 TRACE_DEVEL ("split frame" , QUIC_EV_CONN_PRSAFRM , qc , new_cf );
79467946 if (cf -> origin ) {
@@ -7955,7 +7955,7 @@ static inline int qc_build_frms(struct list *outlist, struct list *inlist,
79557955 LIST_APPEND (outlist , & new_cf -> list );
79567956 /* Consume <dlen> bytes of the current frame. */
79577957 cf -> crypto .len -= dlen ;
7958- cf -> crypto .offset += dlen ;
7958+ cf -> crypto .offset_node . key += dlen ;
79597959 }
79607960 break ;
79617961
0 commit comments