Skip to content

Commit 17b6931

Browse files
nodejs-github-botruyadorno
authored andcommitted
deps: update ngtcp2 to 1.9.1
PR-URL: #56095 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com>
1 parent 68dda61 commit 17b6931

File tree

2 files changed

+25
-11
lines changed

2 files changed

+25
-11
lines changed

deps/ngtcp2/ngtcp2/lib/includes/ngtcp2/version.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
*
3737
* Version number of the ngtcp2 library release.
3838
*/
39-
#define NGTCP2_VERSION "1.9.0"
39+
#define NGTCP2_VERSION "1.9.1"
4040

4141
/**
4242
* @macro
@@ -46,6 +46,6 @@
4646
* number, 8 bits for minor and 8 bits for patch. Version 1.2.3
4747
* becomes 0x010203.
4848
*/
49-
#define NGTCP2_VERSION_NUM 0x010900
49+
#define NGTCP2_VERSION_NUM 0x010901
5050

5151
#endif /* !defined(NGTCP2_VERSION_H) */

deps/ngtcp2/ngtcp2/lib/ngtcp2_conn.c

Lines changed: 23 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5322,35 +5322,28 @@ int ngtcp2_conn_detect_lost_pkt(ngtcp2_conn *conn, ngtcp2_pktns *pktns,
53225322
* conn_recv_ack processes received ACK frame |fr|. |pkt_ts| is the
53235323
* timestamp when packet is received. |ts| should be the current
53245324
* time. Usually they are the same, but for buffered packets,
5325-
* |pkt_ts| would be earlier than |ts|.
5325+
* |pkt_ts| would be earlier than |ts|. This function needs to be
5326+
* called after |fr| is validated by ngtcp2_pkt_validate_ack.
53265327
*
53275328
* This function returns 0 if it succeeds, or one of the following
53285329
* negative error codes:
53295330
*
53305331
* NGTCP2_ERR_NOMEM
53315332
* Out of memory
5332-
* NGTCP2_ERR_ACK_FRAME
5333-
* ACK frame is malformed.
53345333
* NGTCP2_ERR_PROTO
53355334
* |fr| acknowledges a packet this endpoint has not sent.
53365335
* NGTCP2_ERR_CALLBACK_FAILURE
53375336
* User callback failed.
53385337
*/
53395338
static int conn_recv_ack(ngtcp2_conn *conn, ngtcp2_pktns *pktns, ngtcp2_ack *fr,
53405339
ngtcp2_tstamp pkt_ts, ngtcp2_tstamp ts) {
5341-
int rv;
53425340
ngtcp2_ssize num_acked;
53435341
ngtcp2_conn_stat *cstat = &conn->cstat;
53445342

53455343
if (pktns->tx.last_pkt_num < fr->largest_ack) {
53465344
return NGTCP2_ERR_PROTO;
53475345
}
53485346

5349-
rv = ngtcp2_pkt_validate_ack(fr, conn->local.settings.initial_pkt_num);
5350-
if (rv != 0) {
5351-
return rv;
5352-
}
5353-
53545347
ngtcp2_acktr_recv_ack(&pktns->acktr, fr);
53555348

53565349
num_acked =
@@ -6561,6 +6554,13 @@ conn_recv_handshake_pkt(ngtcp2_conn *conn, const ngtcp2_path *path,
65616554
case NGTCP2_FRAME_ACK_ECN:
65626555
fr->ack.ack_delay = 0;
65636556
fr->ack.ack_delay_unscaled = 0;
6557+
6558+
rv =
6559+
ngtcp2_pkt_validate_ack(&fr->ack, conn->local.settings.initial_pkt_num);
6560+
if (rv != 0) {
6561+
return rv;
6562+
}
6563+
65646564
break;
65656565
}
65666566

@@ -8715,6 +8715,13 @@ conn_recv_delayed_handshake_pkt(ngtcp2_conn *conn, const ngtcp2_pkt_info *pi,
87158715
case NGTCP2_FRAME_ACK_ECN:
87168716
fr->ack.ack_delay = 0;
87178717
fr->ack.ack_delay_unscaled = 0;
8718+
8719+
rv =
8720+
ngtcp2_pkt_validate_ack(&fr->ack, conn->local.settings.initial_pkt_num);
8721+
if (rv != 0) {
8722+
return rv;
8723+
}
8724+
87188725
break;
87198726
}
87208727

@@ -9200,6 +9207,13 @@ static ngtcp2_ssize conn_recv_pkt(ngtcp2_conn *conn, const ngtcp2_path *path,
92009207
assert(conn->remote.transport_params);
92019208
assign_recved_ack_delay_unscaled(
92029209
&fr->ack, conn->remote.transport_params->ack_delay_exponent);
9210+
9211+
rv =
9212+
ngtcp2_pkt_validate_ack(&fr->ack, conn->local.settings.initial_pkt_num);
9213+
if (rv != 0) {
9214+
return rv;
9215+
}
9216+
92039217
break;
92049218
}
92059219

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy