Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deps: update ngtcp2 to 1.9.1 #56095

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions deps/ngtcp2/ngtcp2/lib/includes/ngtcp2/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
*
* Version number of the ngtcp2 library release.
*/
#define NGTCP2_VERSION "1.9.0"
#define NGTCP2_VERSION "1.9.1"

/**
* @macro
Expand All @@ -46,6 +46,6 @@
* number, 8 bits for minor and 8 bits for patch. Version 1.2.3
* becomes 0x010203.
*/
#define NGTCP2_VERSION_NUM 0x010900
#define NGTCP2_VERSION_NUM 0x010901

#endif /* !defined(NGTCP2_VERSION_H) */
32 changes: 23 additions & 9 deletions deps/ngtcp2/ngtcp2/lib/ngtcp2_conn.c
Original file line number Diff line number Diff line change
Expand Up @@ -5322,35 +5322,28 @@ int ngtcp2_conn_detect_lost_pkt(ngtcp2_conn *conn, ngtcp2_pktns *pktns,
* conn_recv_ack processes received ACK frame |fr|. |pkt_ts| is the
* timestamp when packet is received. |ts| should be the current
* time. Usually they are the same, but for buffered packets,
* |pkt_ts| would be earlier than |ts|.
* |pkt_ts| would be earlier than |ts|. This function needs to be
* called after |fr| is validated by ngtcp2_pkt_validate_ack.
*
* This function returns 0 if it succeeds, or one of the following
* negative error codes:
*
* NGTCP2_ERR_NOMEM
* Out of memory
* NGTCP2_ERR_ACK_FRAME
* ACK frame is malformed.
* NGTCP2_ERR_PROTO
* |fr| acknowledges a packet this endpoint has not sent.
* NGTCP2_ERR_CALLBACK_FAILURE
* User callback failed.
*/
static int conn_recv_ack(ngtcp2_conn *conn, ngtcp2_pktns *pktns, ngtcp2_ack *fr,
ngtcp2_tstamp pkt_ts, ngtcp2_tstamp ts) {
int rv;
ngtcp2_ssize num_acked;
ngtcp2_conn_stat *cstat = &conn->cstat;

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

rv = ngtcp2_pkt_validate_ack(fr, conn->local.settings.initial_pkt_num);
if (rv != 0) {
return rv;
}

ngtcp2_acktr_recv_ack(&pktns->acktr, fr);

num_acked =
Expand Down Expand Up @@ -6561,6 +6554,13 @@ conn_recv_handshake_pkt(ngtcp2_conn *conn, const ngtcp2_path *path,
case NGTCP2_FRAME_ACK_ECN:
fr->ack.ack_delay = 0;
fr->ack.ack_delay_unscaled = 0;

rv =
ngtcp2_pkt_validate_ack(&fr->ack, conn->local.settings.initial_pkt_num);
if (rv != 0) {
return rv;
}

break;
}

Expand Down Expand Up @@ -8715,6 +8715,13 @@ conn_recv_delayed_handshake_pkt(ngtcp2_conn *conn, const ngtcp2_pkt_info *pi,
case NGTCP2_FRAME_ACK_ECN:
fr->ack.ack_delay = 0;
fr->ack.ack_delay_unscaled = 0;

rv =
ngtcp2_pkt_validate_ack(&fr->ack, conn->local.settings.initial_pkt_num);
if (rv != 0) {
return rv;
}

break;
}

Expand Down Expand Up @@ -9200,6 +9207,13 @@ static ngtcp2_ssize conn_recv_pkt(ngtcp2_conn *conn, const ngtcp2_path *path,
assert(conn->remote.transport_params);
assign_recved_ack_delay_unscaled(
&fr->ack, conn->remote.transport_params->ack_delay_exponent);

rv =
ngtcp2_pkt_validate_ack(&fr->ack, conn->local.settings.initial_pkt_num);
if (rv != 0) {
return rv;
}

break;
}

Expand Down
Loading