summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDave Wallace <dwallacelf@gmail.com>2024-11-16 01:26:42 -0500
committerFlorin Coras <florin.coras@gmail.com>2024-11-19 16:47:02 +0000
commita2bc88bb694302fa6e2e65fca737ca3dd3b0854e (patch)
tree9d9deca8cf4d52ad3d5ed3a6f8acb8cdbbd238ea /src
parent56265b9f55cbbd93a9eecae568450f321153842d (diff)
quic: update to quicly version 0.1.5
Type: improvement Change-Id: I7c9c91a9c4d3ac2499e42eedda0a5d395bdf5912 Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
Diffstat (limited to 'src')
-rw-r--r--src/plugins/quic/CMakeLists.txt2
-rw-r--r--src/plugins/quic/quic.c32
-rw-r--r--src/plugins/quic/quic.h2
-rw-r--r--src/plugins/tlspicotls/CMakeLists.txt2
4 files changed, 16 insertions, 22 deletions
diff --git a/src/plugins/quic/CMakeLists.txt b/src/plugins/quic/CMakeLists.txt
index 65bdc32a239..4f408ca66d3 100644
--- a/src/plugins/quic/CMakeLists.txt
+++ b/src/plugins/quic/CMakeLists.txt
@@ -18,7 +18,7 @@ if(NOT OPENSSL_FOUND)
endif()
unset(QUIC_LINK_LIBRARIES)
-set(EXPECTED_QUICLY_VERSION "0.1.4-vpp")
+set(EXPECTED_QUICLY_VERSION "0.1.5-vpp")
vpp_find_path(QUICLY_INCLUDE_DIR NAMES quicly.h)
vpp_find_path(PICOTLS_INCLUDE_DIR NAMES picotls.h)
diff --git a/src/plugins/quic/quic.c b/src/plugins/quic/quic.c
index 3797cd2b4ea..15a5263284a 100644
--- a/src/plugins/quic/quic.c
+++ b/src/plugins/quic/quic.c
@@ -250,7 +250,6 @@ quic_init_crypto_context (crypto_context_t * crctx, quic_ctx_t * ctx)
ptls_ctx->cipher_suites = qm->quic_ciphers[ctx->crypto_engine];
ptls_ctx->certificates.list = NULL;
ptls_ctx->certificates.count = 0;
- ptls_ctx->esni = NULL;
ptls_ctx->on_client_hello = NULL;
ptls_ctx->emit_certificate = NULL;
ptls_ctx->sign_certificate = NULL;
@@ -718,7 +717,6 @@ quic_send_packets (quic_ctx_t * ctx)
session_t *udp_session;
quicly_conn_t *conn;
size_t num_packets, i, max_packets;
- quicly_address_t dest, src;
u32 n_sent = 0;
int err = 0;
@@ -744,17 +742,16 @@ quic_send_packets (quic_ctx_t * ctx)
break;
num_packets = max_packets;
- if ((err = quicly_send (conn, &dest, &src, packets, &num_packets, buf,
- sizeof (buf))))
+ if ((err = quicly_send (conn, &ctx->rmt_ip, &ctx->lcl_ip, packets,
+ &num_packets, buf, sizeof (buf))))
goto quicly_error;
for (i = 0; i != num_packets; ++i)
{
- if ((err =
- quic_send_datagram (udp_session, &packets[i], &dest, &src)))
- goto quicly_error;
-
+ if ((err = quic_send_datagram (udp_session, &packets[i],
+ &ctx->rmt_ip, &ctx->lcl_ip)))
+ goto quicly_error;
}
n_sent += num_packets;
}
@@ -1848,10 +1845,10 @@ quic_udp_session_connected_callback (u32 quic_app_index, u32 ctx_index,
quic_build_sockaddr (sa, &salen, &tc->rmt_ip, tc->rmt_port, tc->is_ip4);
quicly_ctx = quic_get_quicly_ctx_from_ctx (ctx);
- ret = quicly_connect (&ctx->conn, quicly_ctx, (char *) ctx->srv_hostname,
- sa, NULL, &quic_main.wrk_ctx[thread_index].next_cid,
+ ret = quicly_connect (&ctx->conn, quicly_ctx, (char *) ctx->srv_hostname, sa,
+ NULL, &quic_main.wrk_ctx[thread_index].next_cid,
ptls_iovec_init (NULL, 0), &quic_main.hs_properties,
- NULL);
+ NULL, NULL);
++quic_main.wrk_ctx[thread_index].next_cid.master_id;
/* Save context handle in quicly connection */
quic_store_conn_ctx (ctx->conn, ctx);
@@ -2103,10 +2100,9 @@ quic_accept_connection (quic_rx_packet_ctx_t * pctx)
}
quicly_ctx = quic_get_quicly_ctx_from_ctx (ctx);
- if ((rv = quicly_accept (&conn, quicly_ctx, NULL, &pctx->sa,
- &pctx->packet, NULL,
- &quic_main.wrk_ctx[pctx->thread_index].next_cid,
- NULL)))
+ if ((rv = quicly_accept (
+ &conn, quicly_ctx, NULL, &pctx->sa, &pctx->packet, NULL,
+ &quic_main.wrk_ctx[pctx->thread_index].next_cid, NULL, NULL)))
{
/* Invalid packet, pass */
assert (conn == NULL);
@@ -2192,12 +2188,8 @@ quic_reset_connection (u64 udp_session_handle, quic_rx_packet_ctx_t * pctx)
packet.iov_len = payload_len;
packet.iov_base = payload;
- struct _st_quicly_conn_public_t *conn =
- (struct _st_quicly_conn_public_t *) qctx->conn;
-
udp_session = session_get_from_handle (udp_session_handle);
- rv = quic_send_datagram (udp_session, &packet, &conn->remote.address,
- &conn->local.address);
+ rv = quic_send_datagram (udp_session, &packet, &qctx->rmt_ip, &qctx->lcl_ip);
quic_set_udp_tx_evt (udp_session);
return rv;
}
diff --git a/src/plugins/quic/quic.h b/src/plugins/quic/quic.h
index 2c5a21c01a4..081bcb120e9 100644
--- a/src/plugins/quic/quic.h
+++ b/src/plugins/quic/quic.h
@@ -179,6 +179,8 @@ typedef struct quic_ctx_
ptls_aead_context_t *aead_ctx;
} ingress_keys;
int key_phase_ingress;
+ quicly_address_t rmt_ip;
+ quicly_address_t lcl_ip;
} quic_ctx_t;
diff --git a/src/plugins/tlspicotls/CMakeLists.txt b/src/plugins/tlspicotls/CMakeLists.txt
index e60a0e0ebd4..3d16ded34ce 100644
--- a/src/plugins/tlspicotls/CMakeLists.txt
+++ b/src/plugins/tlspicotls/CMakeLists.txt
@@ -10,7 +10,7 @@ endif()
# it's reasonable to make this check to avoid breaking
# existing builds when upgrading the quicly/picotls
# versions
-set(EXPECTED_QUICLY_VERSION "0.1.4-vpp")
+set(EXPECTED_QUICLY_VERSION "0.1.5-vpp")
vpp_find_path(QUICLY_INCLUDE_DIR NAMES quicly.h)