]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
daemon/session: remove commented code
authorFrantisek Tobias <frantisek.tobias@nic.cz>
Mon, 6 Oct 2025 08:39:03 +0000 (10:39 +0200)
committerFrantisek Tobias <frantisek.tobias@nic.cz>
Wed, 7 Jan 2026 13:39:14 +0000 (14:39 +0100)
daemon/session2.c
daemon/session2.h
daemon/tls.h

index 25c7eded296323502e21e7a748aae544e89cab47..1af90d77b76596cf414901adada66b9f2a00aab3 100644 (file)
@@ -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,
index 9a139866c1730751ee059b7c799d8a4b79e15599..e4fcd099fbd34c9952938cca9cfd9738658967c0 100644 (file)
@@ -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;
 }
 
index 63eaa0534fa10cc0649dbc93dc66cd5fd394f68a..b24b6165881cad1a40ca434cf118eb4697be717b 100644 (file)
@@ -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 */
 };