summaryrefslogtreecommitdiffstats
path: root/src/libknot/quic
diff options
context:
space:
mode:
authorLibor Peltan <libor.peltan@nic.cz>2023-08-24 14:22:34 +0200
committerLibor Peltan <libor.peltan@nic.cz>2023-08-24 14:22:34 +0200
commitf7e665918782bec5aeaed745d3f777f0823da6e8 (patch)
tree302e927395c5ead4a82eb08045907ff10344b319 /src/libknot/quic
parentquic: set logging callbacks to NULL if unused for optimization (diff)
downloadknot-f7e665918782bec5aeaed745d3f777f0823da6e8.tar.xz
knot-f7e665918782bec5aeaed745d3f777f0823da6e8.zip
quic: remove unnecessary argument
Diffstat (limited to 'src/libknot/quic')
-rw-r--r--src/libknot/quic/quic.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/libknot/quic/quic.c b/src/libknot/quic/quic.c
index 141467f2b..2d871c724 100644
--- a/src/libknot/quic/quic.c
+++ b/src/libknot/quic/quic.c
@@ -759,7 +759,7 @@ static void user_qlog(void *user_data, uint32_t flags, const void *data, size_t
static int conn_new(ngtcp2_conn **pconn, const ngtcp2_path *path, const ngtcp2_cid *scid,
const ngtcp2_cid *dcid, const ngtcp2_cid *odcid, uint32_t version,
- uint64_t now, size_t udp_pl, uint64_t idle_timeout_ns,
+ uint64_t now, uint64_t idle_timeout_ns,
knot_quic_conn_t *qconn, bool server, bool retry_sent)
{
knot_quic_table_t *qtable = qconn->quic_table;
@@ -817,8 +817,8 @@ static int conn_new(ngtcp2_conn **pconn, const ngtcp2_path *path, const ngtcp2_c
if (qtable->qlog_dir != NULL) {
settings.qlog_write = user_qlog;
}
- if (udp_pl != 0) {
- settings.max_tx_udp_payload_size = udp_pl;
+ if (qtable->udp_payload_limit != 0) {
+ settings.max_tx_udp_payload_size = qtable->udp_payload_limit;
}
settings.handshake_timeout = idle_timeout_ns; // NOTE setting handshake timeout to idle_timeout for simplicity
@@ -884,7 +884,7 @@ int knot_quic_client(knot_quic_table_t *table, struct sockaddr_in6 *dest,
path.local.addrlen = addr_len((const struct sockaddr_in6 *)via);
int ret = conn_new(&conn->conn, &path, &dcid, &scid, NULL, NGTCP2_PROTO_VER_V1, now,
- table->udp_payload_limit, 5000000000L, conn, false, false);
+ 5000000000L, conn, false, false);
if (ret == KNOT_EOK) {
ret = tls_init_conn_session(conn, false);
}
@@ -988,8 +988,7 @@ int knot_quic_handle(knot_quic_table_t *table, knot_quic_reply_t *reply,
quic_conn_mark_used(conn, table, now);
ret = conn_new(&conn->conn, &path, &dcid, &scid, &odcid, decoded_cids.version,
- now, table->udp_payload_limit, idle_timeout, conn, true,
- header.tokenlen > 0);
+ now, idle_timeout, conn, true, header.tokenlen > 0);
if (ret >= 0) {
ret = tls_init_conn_session(conn, true);
}