From 6501ed850563e5c99ecfdb6d5f324d38c60378fe Mon Sep 17 00:00:00 2001 From: Kazuho Oku Date: Fri, 13 Oct 2023 13:46:38 +0900 Subject: [PATCH] oopses --- lib/quicly.c | 2 +- src/cli.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/quicly.c b/lib/quicly.c index cb40e3f3..633512cc 100644 --- a/lib/quicly.c +++ b/lib/quicly.c @@ -5360,7 +5360,7 @@ static int handle_ack_frame(quicly_conn_t *conn, struct st_quicly_handle_payload /* update counters */ for (size_t i = 0; i < PTLS_ELEMENTSOF(frame.ecn_counts); ++i) { if (frame.ecn_counts[i] > conn->egress.ecn.counts[state->epoch][i]) { - conn->super.stats.num_packets.ack_ecn_counts[i] = frame.ecn_counts[i] - conn->egress.ecn.counts[state->epoch][i]; + conn->super.stats.num_packets.ack_ecn_counts[i] += frame.ecn_counts[i] - conn->egress.ecn.counts[state->epoch][i]; conn->egress.ecn.counts[state->epoch][i] = frame.ecn_counts[i]; } } diff --git a/src/cli.c b/src/cli.c index d105ad09..74cf5431 100644 --- a/src/cli.c +++ b/src/cli.c @@ -465,7 +465,7 @@ static ssize_t receive_datagram(int fd, void *buf, quicly_address_t *src, uint8_ static void set_ecn(struct msghdr *mess, int ecn) { - if (ecn != 0) + if (ecn == 0) return; struct cmsghdr *cmsg = (struct cmsghdr *)((char *)mess->msg_control + mess->msg_controllen);