From: Frantisek Tobias Date: Mon, 6 Oct 2025 08:39:03 +0000 (+0200) Subject: daemon/session: remove commented code X-Git-Tag: v6.2.0~2^2~37 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=155cc75889cd9d82c3166347ddfd664c8b35d958;p=thirdparty%2Fknot-resolver.git daemon/session: remove commented code --- diff --git a/daemon/session2.c b/daemon/session2.c index 25c7eded2..1af90d77b 100644 --- a/daemon/session2.c +++ b/daemon/session2.c @@ -71,37 +71,21 @@ static const enum protolayer_type protolayer_grp_doh[] = { static const enum protolayer_type protolayer_grp_doq_stream[] = { PROTOLAYER_TYPE_QUIC_STREAM, - // PROTOLAYER_TYPE_DNS_UNSIZED_STREAM, PROTOLAYER_TYPE_DNS_SINGLE_STREAM, - // PROTOLAYER_TYPE_DNS_MULTI_STREAM, - // PROTOLAYER_TYPE_DNS_DGRAM, }; static const enum protolayer_type protolayer_grp_doq_conn[] = { - // PROTOLAYER_TYPE_UDP, - // PROTOLAYER_TYPE_PROXYV2_DGRAM, - // PROTOLAYER_TYPE_DEFER, - // PROTOLAYER_TYPE_QUIC_DEMUX, + PROTOLAYER_TYPE_DEFER, PROTOLAYER_TYPE_QUIC_CONN, - // PROTOLAYER_TYPE_DNS_DGRAM, - // PROTOLAYER_TYPE_DNS_UNSIZED_STREAM, - // PROTOLAYER_TYPE_DNS_MULTI_STREAM, - // PROTOLAYER_TYPE_DNS_SINGLE_STREAM, PROTOLAYER_TYPE_NULL, }; static const enum protolayer_type protolayer_grp_doq_demux[] = { PROTOLAYER_TYPE_UDP, - // PROTOLAYER_TYPE_PROXYV2_DGRAM, - // PROTOLAYER_TYPE_DEFER, PROTOLAYER_TYPE_QUIC_DEMUX, PROTOLAYER_TYPE_NULL, - // PROTOLAYER_TYPE_QUIC_CONN, - // PROTOLAYER_TYPE_DNS_DGRAM, }; - - struct protolayer_grp { const enum protolayer_type *layers; size_t num_layers; @@ -660,7 +644,7 @@ static int session2_submit( if ((direction == PROTOLAYER_UNWRAP) && (layer_ix == 0)) defer_sample_start(NULL); - struct protolayer_iter_ctx *ctx = malloc(session->iter_ctx_size); + struct protolayer_iter_ctx *ctx = malloc(session->iter_ctx_size); kr_require(ctx); VERBOSE_LOG(session, diff --git a/daemon/session2.h b/daemon/session2.h index 9a139866c..e4fcd099f 100644 --- a/daemon/session2.h +++ b/daemon/session2.h @@ -349,6 +349,8 @@ typedef void (*protolayer_finished_cb)(int status, struct session2 *session, XX(OS_BUFFER_FULL) \ /** Request update of connection data, only used by DoQ */\ XX(CONNECT_UPDATE) \ + /** Request removal of cid, only used by DoQ */\ + XX(CONNECT_RETIRE) \ // /** Event type, to be interpreted by a layer. */ @@ -570,10 +572,8 @@ size_t protolayer_iter_size_est(struct protolayer_iter_ctx *ctx, bool incl_paylo /** Layer-specific data - the generic struct. To be added as the first member of * each specific struct. */ struct protolayer_data { - /* FIXME: Only used by quic_demux, I do not like changing this struct - * so seriously consider if it is neccesarry here */ int heap_node_placeholder; // MUST be first field of the struct - uint64_t next_expiry; + uint64_t heap_value; struct session2 *session; /**< Pointer to the owner session. */\ }; @@ -993,7 +993,6 @@ static inline struct session2 *session2_new_child(struct session2 *parent, struct session2 *s = session2_new(SESSION2_TRANSPORT_PARENT, layer_grp, layer_param, layer_param_count, outgoing); s->transport.parent = parent; - s->comm_storage = parent->comm_storage; return s; } diff --git a/daemon/tls.h b/daemon/tls.h index 63eaa0534..b24b61658 100644 --- a/daemon/tls.h +++ b/daemon/tls.h @@ -15,7 +15,6 @@ #define MAX_TLS_PADDING KR_EDNS_PAYLOAD #define TLS_MAX_UNCORK_RETRIES 100 -#define ENABLE_QUIC /* rfc 5476, 7.3 - handshake Protocol overview * https://tools.ietf.org/html/rfc5246#page-33 @@ -45,10 +44,6 @@ struct tls_credentials { gnutls_certificate_credentials_t credentials; time_t valid_until; char *ephemeral_servicename; -#ifdef ENABLE_QUIC - gnutls_anti_replay_t tls_anti_replay; - // gnutls_datum_t tls_ticket_key; -#endif /* ENABLE_QUIC */ };