]> git.kaiwu.me - haproxy.git/commitdiff
CLEANUP: tree-wide: fix comment typos all over the tree (~68)
authorWilly Tarreau <w@1wt.eu>
Tue, 28 Apr 2026 01:43:22 +0000 (03:43 +0200)
committerWilly Tarreau <w@1wt.eu>
Wed, 29 Apr 2026 13:11:44 +0000 (15:11 +0200)
This covers hpack, quic, h3, map, acl, pattern, tcpchecks, clienthello.
Only comments were touched, 100% harmless, no need to backport.

28 files changed:
include/haproxy/hpack-enc.h
include/haproxy/quic_ack-t.h
include/haproxy/quic_conn-t.h
include/haproxy/quic_enc.h
src/acl.c
src/cfgparse-quic.c
src/h3.c
src/hpack-enc.c
src/jws.c
src/jwt.c
src/map.c
src/pattern.c
src/payload.c
src/qpack-enc.c
src/quic_ack.c
src/quic_cc_bbr.c
src/quic_cc_cubic.c
src/quic_cid.c
src/quic_cli.c
src/quic_conn.c
src/quic_frame.c
src/quic_openssl_compat.c
src/quic_retransmit.c
src/quic_rules.c
src/quic_rx.c
src/quic_stream.c
src/ssl_clienthello.c
src/tcpcheck.c

index 7511c5da089fb8479e400b282da0ebdca5b07983..063d5c62e72da5497472a120a17b1423d46ec8b6 100644 (file)
@@ -164,7 +164,7 @@ static inline int hpack_encode_int_status(struct buffer *out, unsigned int statu
                goto fail;
 
        /* basic encoding of the status code */
-       out->area[len - 5] = 0x48; // indexed name -- name=":status" (idx 8)
+       out->area[len - 5] = 0x48; // literal with incremental indexing, name=":status" (idx 8)
        out->area[len - 4] = 0x03; // 3 bytes status
        out->area[len - 3] = '0' + status / 100;
        out->area[len - 2] = '0' + status / 10 % 10;
index 64182e6db4389e5622047f56cd1dbd559d4f2d07..b819514d488340b21b16f5d20ac8007bdb018acd 100644 (file)
@@ -24,7 +24,7 @@
 struct quic_arngs {
        /* ebtree of ACK ranges organized by their first value. */
        struct eb_root root;
-       /* The number of ACK ranges is this tree */
+       /* The number of ACK ranges in this tree */
        size_t sz;
        /* The number of bytes required to encode this ACK ranges lists. */
        size_t enc_sz;
@@ -36,7 +36,7 @@ struct quic_arng {
        int64_t last;
 };
 
-/* Structure to hold a range of ACKs to be store as a node in a tree of
+/* Structure to hold a range of ACKs to be stored as a node in a tree of
  * ACK ranges.
  */
 struct quic_arng_node {
index 0a7ce3951ffa03ae48a40f271d7f8513eb6236d4..c9d51d09a66366b611e9188c6f8f538e164f1572 100644 (file)
@@ -229,7 +229,7 @@ extern const struct quic_version *quic_version_2;
 /* Flag the packet number space as needing probing */
 #define QUIC_FL_PKTNS_PROBE_NEEDED  (1UL << 2)
 /* Flag the packet number space as having received a packet with a new largest
- * packet number, to be acknowledege
+ * packet number, to be acknowledged
  */
 #define QUIC_FL_PKTNS_NEW_LARGEST_PN (1UL << 3)
 
index fc37cdfeb26903a4867bc8ba17c8c2e3d786f70b..cab5119431183e259511e18721675a6f743d8777 100644 (file)
@@ -51,7 +51,7 @@
 
 /* Returns enough log2 of first powers of two to encode QUIC variable length
  * integers.
- * Returns -1 if <val> if out of the range of lengths supported by QUIC.
+ * Returns -1 if <val> is out of the range of lengths supported by QUIC.
  */
 static inline int quic_log2(unsigned int val)
 {
@@ -109,7 +109,7 @@ static inline uint64_t quic_max_int(size_t sz)
  * Note that the result is a 64-bits integer but with the less significant
  * 62 bits as relevant information. The most significant 2 remaining bits encode
  * the length of the integer.
- * Returns 1 if succeeded there was enough data in <buf>), 0 if not.
+ * Returns 1 if succeeded (there was enough data in <buf>), 0 if not.
  */
 static inline int quic_dec_int(uint64_t *val,
                                const unsigned char **buf,
@@ -137,7 +137,7 @@ static inline int quic_dec_int(uint64_t *val,
  * the length of the integer.
  * Note that this function update <b> buffer when a variable-length integer
  * has successfully been parsed.
- * Returns 1 and if succeeded (there was enough data in <buf>), 0 if not.
+ * Returns 1 if succeeded (there was enough data in <buf>), 0 if not.
  * If <retlen> is not null, increment <*retlen> by the number of bytes consumed to decode
  * the varint.
  */
@@ -173,7 +173,7 @@ static inline size_t b_quic_dec_int(uint64_t *val, struct buffer *b, size_t *ret
 
 /* Encode a QUIC variable-length integer from <val> into <buf> buffer with <end> as first
  * byte address after the end of this buffer.
- * Returns 1 if succeeded (there was enough room in buf), 0 if not.
+ * Returns 1 if succeeded (there was enough room in <buf>), 0 if not.
  */
 static inline int quic_enc_int(unsigned char **buf, const unsigned char *end, uint64_t val)
 {
@@ -209,7 +209,7 @@ static inline int b_quic_enc_int(struct buffer *b, uint64_t val, int width)
        char *pos;
        int save_width, len;
 
-       /* width can only by 0, 1, 2, 4 or 8 */
+       /* width can only be 0, 1, 2, 4 or 8 */
        BUG_ON(width && (width > 8 || atleast2(width)));
 
        len = quic_int_getsize(val);
@@ -279,7 +279,7 @@ static inline size_t quic_decint_size_diff(uint64_t val)
  * Returns the value usable as Length field, or 0 if <room> is too small.
  *
  * Here are examples of the output returned by the function. For each inputs
- * between charets, returned value is written associated with its implicit
+ * between brackets, returned value is written associated with its implicit
  * variable-length integer size :
  *
  * [64] => 63(1)        [65] => 63(1)        [66] => 64(2)
index 2aff18e4ff26124e7ec08a8b3358c28186d8f49c..08538f9dffd559283b9764a3eccdfed1a59a03f3 100644 (file)
--- a/src/acl.c
+++ b/src/acl.c
@@ -441,7 +441,7 @@ struct acl_expr *parse_acl_expr(const char **args, char **err, struct arg_list *
                arg = *args;
 
                /* Compatibility layer. Each pattern can parse only one string per pattern,
-                * but the pat_parser_int() and pat_parse_dotted_ver() parsers were need
+                * but the pat_parse_int() and pat_parse_dotted_ver() parsers need
                 * optionally two operators. The first operator is the match method: eq,
                 * le, lt, ge and gt. pat_parse_int() and pat_parse_dotted_ver() functions
                 * can have a compatibility syntax based on ranges:
@@ -560,7 +560,7 @@ struct acl_expr *parse_acl_expr(const char **args, char **err, struct arg_list *
                        }
                }
 
-               /* Add sample to the reference, and try to compile it fior each pattern
+               /* Add sample to the reference, and try to compile it for each pattern
                 * using this value.
                 */
                if (!pat_ref_add(ref, arg, NULL, err))
index e4122bbe1fc1f68910590f0e43a47b01a35c26ae..f06a4847dc0d54c33a50ba87cb465396571f62a4 100644 (file)
@@ -235,7 +235,7 @@ static int bind_parse_quic_socket(char **args, int cur_arg, struct proxy *px,
        return 0;
 }
 
-/* parse "quic-cc-algo" bind keyword */
+/* parse "quic-cc-algo" server keyword */
 static int srv_parse_quic_cc_algo(char **args, int *cur_arg, struct proxy *px,
                                   struct server *srv, char **err)
 {
index a7950fa1db8eaa8da29e6689cbd2fc108bd84c30..a899370ce868e5f3f3cc547d9124055cb604017c 100644 (file)
--- a/src/h3.c
+++ b/src/h3.c
@@ -243,9 +243,9 @@ static ssize_t h3_init_uni_stream(struct h3c *h3c, struct qcs *qcs,
                break;
 
        default:
-               /* draft-ietf-quic-http34 9. Extensions to HTTP/3
+               /* RFC 9114 Section 9. Extensions to HTTP/3
                 *
-                * Implementations MUST [...] abort reading on unidirectional
+                * Implementations MUST abort reading on unidirectional
                 * streams that have unknown or unsupported types.
                 */
                TRACE_STATE("abort reading on unknown uni stream type", H3_EV_H3S_NEW, qcs->qcc->conn, qcs);
@@ -1632,7 +1632,7 @@ static ssize_t h3_parse_settings_frm(struct h3c *h3c, const struct buffer *buf,
                h3_debug_printf(stderr, "%s id: %llu value: %llu\n",
                                __func__, (unsigned long long)id, (unsigned long long)value);
 
-               /* draft-ietf-quic-http34 7.2.4. SETTINGS
+               /* RFC 9114 Section 7.2.4. SETTINGS
                 *
                 * The same setting identifier MUST NOT occur more than once in the
                 * SETTINGS frame.  A receiver MAY treat the presence of duplicate
@@ -1665,9 +1665,9 @@ static ssize_t h3_parse_settings_frm(struct h3c *h3c, const struct buffer *buf,
                case H3_SETTINGS_RESERVED_3:
                case H3_SETTINGS_RESERVED_4:
                case H3_SETTINGS_RESERVED_5:
-                       /* draft-ietf-quic-http34 7.2.4.1. Defined SETTINGS Parameters
+                       /* RFC 9114 Section 7.2.4.1. Defined SETTINGS Parameters
                         *
-                        * Setting identifiers which were defined in [HTTP2] where there is no
+                        * Setting identifiers which were defined in [HTTP/2] where there is no
                         * corresponding HTTP/3 setting have also been reserved
                         * (Section 11.2.2).  These reserved settings MUST NOT be sent, and
                         * their receipt MUST be treated as a connection error of type
@@ -1954,7 +1954,7 @@ static ssize_t h3_rcv_buf(struct qcs *qcs, struct buffer *b, int fin)
                        h3c->flags |= H3_CF_SETTINGS_RECV;
                        break;
                default:
-                       /* draft-ietf-quic-http34 9. Extensions to HTTP/3
+                       /* RFC 9114 Section 9. Extensions to HTTP/3
                         *
                         * Implementations MUST discard frames [...] that have unknown
                         * or unsupported types.
index 3ab21bc5f083ccf3b180082171dfd13a3e0c6523..98324b473856300a984dbb3ecc6001410eafe137 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * HPACK decompressor (RFC7541)
+ * HPACK compressor (RFC7541)
  *
  * Copyright (C) 2014-2017 Willy Tarreau <willy@haproxy.org>
  * Copyright (C) 2017 HAProxy Technologies
index 7a4d83e6fae2e0098fde79fa13a26f45edb682e2..e4ea30de695c29f44e52a84dad95cd1e84a4979c 100644 (file)
--- a/src/jws.c
+++ b/src/jws.c
@@ -417,7 +417,7 @@ size_t jws_b64_signature(EVP_PKEY *pkey, enum jwt_alg alg, char *b64protected, c
 
 
        if (EVP_PKEY_base_id(pkey) == EVP_PKEY_EC) {
-               /* Convert the DigestSign output to an ECDSA_SIG (R and S parameters concatenatedi,
+               /* Convert the DigestSign output to an ECDSA_SIG (R and S parameters concatenated,
                 * see section 3.4 of RFC7518), and output R and S padded.
                 */
                ECDSA_SIG *sig = NULL;
index 0ab557afe413ef41d8cdd3b21a6e0358da3d55a4..5359678afb553936d98e331928c1dc8b55b89099 100644 (file)
--- a/src/jwt.c
+++ b/src/jwt.c
@@ -294,7 +294,7 @@ jwt_jwsverify_hmac(const struct jwt_ctx *ctx, const struct buffer *decoded_signa
 }
 
 /*
- * Convert a JWT ECDSA signature (R and S parameters concatenatedi, see section
+ * Convert a JWT ECDSA signature (R and S parameters concatenated, see section
  * 3.4 of RFC7518) into an ECDSA_SIG that can be fed back into OpenSSL's digest
  * verification functions.
  * Returns 0 in case of success.
index d85b2e5d60366c89b19ba934117e5aeeaa266c17..4daf79b60b3fa5506f647cf3e991a44fa8407168 100644 (file)
--- a/src/map.c
+++ b/src/map.c
@@ -72,7 +72,7 @@ int map_parse_int(const char *text, struct sample_data *data)
        return 1;
 }
 
-/* This crete and initialize map descriptor.
+/* This creates and initializes map descriptor.
  * Return NULL if out of memory error
  */
 static struct map_descriptor *map_create_descriptor(struct sample_conv *conv)
index ef6e8c2cf85b49c09a1af3ba437ebe295f1d3dab..41f834582a9c9755bc9183aeac476364ab9687bb 100644 (file)
@@ -211,7 +211,7 @@ int pat_parse_nothing(const char *text, struct pattern *pattern, int mflags, cha
        return 1;
 }
 
-/* Parse a string. It is allocated and duplicated. */
+/* Parse a string. The text is used directly without allocation. */
 int pat_parse_str(const char *text, struct pattern *pattern, int mflags, char **err)
 {
        pattern->type = SMP_T_STR;
@@ -220,7 +220,7 @@ int pat_parse_str(const char *text, struct pattern *pattern, int mflags, char **
        return 1;
 }
 
-/* Parse a binary written in hexa. It is allocated. */
+/* Parse a binary written in hexa. The data is stored in the trash chunk. */
 int pat_parse_bin(const char *text, struct pattern *pattern, int mflags, char **err)
 {
        struct buffer *trash;
@@ -232,7 +232,7 @@ int pat_parse_bin(const char *text, struct pattern *pattern, int mflags, char **
        return !!parse_binary(text, &pattern->ptr.str, &pattern->len, err);
 }
 
-/* Parse a regex. It is allocated. */
+/* Parse a regex. The text is used directly without allocation. */
 int pat_parse_reg(const char *text, struct pattern *pattern, int mflags, char **err)
 {
        pattern->ptr.str = (char *)text;
@@ -433,7 +433,7 @@ int pat_parse_ip(const char *text, struct pattern *pattern, int mflags, char **e
  *
  */
 
-/* always return false */
+/* returns a match when the sample's integer value is non-zero, otherwise returns NULL */
 struct pattern *pat_match_nothing(struct sample *smp, struct pattern_expr *expr, int fill)
 {
        if (smp->data.u.sint) {
@@ -909,7 +909,7 @@ struct pattern *pat_match_dir(struct sample *smp, struct pattern_expr *expr, int
 }
 
 /* Checks that the pattern is included inside the tested string, but enclosed
- * between the delmiters '/', '?', '.' or ":" or at the beginning or end of
+ * between the delimiters '/', '?', '.' or ":" or at the beginning or end of
  * the string. Delimiters at the beginning or end of the pattern are ignored.
  */
 struct pattern *pat_match_dom(struct sample *smp, struct pattern_expr *expr, int fill)
index 77734e0f1615a9feb980c63e32b3bbf2d33ec455..d86f3b1dd2015337830e93aa61c9d55598a4ed9c 100644 (file)
@@ -264,7 +264,7 @@ smp_fetch_req_ssl_st_ext(const struct arg *args, struct sample *smp, const char
                if (ext_len > hs_len - 4) /* Extension too long */
                        goto not_ssl_hello;
 
-               /* SesstionTicket extension */
+               /* SessionTicket extension */
                if (ext_type == 35) {
                        smp->data.type = SMP_T_SINT;
                        /* SessionTicket also present */
index 19de6a9ec74c15cbf7049013d83c0b4ea40ddac0..3877b7b945f78846cdcef1d38690cb353500854a 100644 (file)
@@ -88,7 +88,7 @@ int qpack_encode_int_status(struct buffer *out, unsigned int status)
        case 425: idx = 70; break;
        case 500: idx = 71; break;
 
-       /* status code not in QPACK static table, idx is null. */
+       /* status code not in QPACK static table, idx is 0. */
        default: break;
        }
 
@@ -281,7 +281,7 @@ int qpack_encode_header(struct buffer *out, const struct ist n, const struct ist
 
        /* literal field line with literal name
         * | 0 | 0 | 1 | N | H | . | . | . |
-        * N :(allow an intermediary to add the header in a dynamic table)
+        * N: allow an intermediary to add the header in a dynamic table
         * H: huffman encoded
         * name len
         */
index 9a34c1b77911d7e941dafe69c0020c0616ed7490..bb6e5cfad51ce607951d24c26e3c4833668f5245 100644 (file)
@@ -68,7 +68,7 @@ static void quic_arngs_set_enc_sz(struct quic_conn *qc, struct quic_arngs *arngs
        TRACE_LEAVE(QUIC_EV_CONN_TXPKT, qc);
 }
 
-/* Insert <ar> ack range into <argns> tree of ack ranges.
+/* Insert <ar> ack range into <arngs> tree of ack ranges.
  * Returns the ack range node which has been inserted if succeeded, NULL if not.
  */
 static inline
index bb8a5f06d5e4241d772b1b8edc58c03aed0edcbb..235b46bf14764cc6f7f0f50484e7cf7b7eedd79b 100644 (file)
@@ -1377,12 +1377,12 @@ static void bbr_handle_lost_packet(struct bbr *bbr, struct quic_cc_path *p,
        if (!bbr->bw_probe_samples)
                return; /* not a packet sent while probing bandwidth */
 
-       /* Only ->tx_in_fligth, ->lost and ->is_app_limited <rs> member
+       /* Only ->tx_in_flight, ->lost and ->is_app_limited <rs> member
         * initializations are needed.
         */
        rs.tx_in_flight = pkt->rs.tx_in_flight; /* inflight at transmit */
        BUG_ON(bbr->drs.lost + pkt->len < lost);
-       /* bbr->rst->lost is not yet incremented */
+       /* bbr->drs.lost is not yet incremented */
        rs.lost = bbr->drs.lost + pkt->len - lost; /* data lost since transmit */
        rs.is_app_limited = pkt->rs.is_app_limited;
        if (is_inflight_too_high(&rs)) {
index a1cc4800257e23eaef0617acd60956eb6f7cc6a4..2532b54dcb316388ba9f0b83491bfe3bad806bf3 100644 (file)
@@ -412,13 +412,13 @@ static void quic_enter_recovery(struct quic_cc *cc)
         * to allow the new flow some room for growth if the existing flows have
         * been using all the network bandwidth. To speed up this bandwidth release
         * by existing flows, the following fast convergence mechanism SHOULD be
-        * implemented.With fast convergence, when a congestion event occurs, Wmax
+        * implemented. With fast convergence, when a congestion event occurs, Wmax
         * is updated as follows, before the window reduction described in Section
         * 4.6.
         *
-        *       if cwnd < Wmax and fast convergence enabled, further reduce Wax:
+        *       if cwnd < Wmax and fast convergence enabled, further reduce Wmax:
         *              Wmax = cwnd * (1 + beta_cubic)
-        *       otherwise, remember cwn before reduction:
+        *       otherwise, remember cwnd before reduction:
         *              Wmax = cwnd
         */
        if (path->cwnd < c->last_w_max) {
index 804883de51f0dfd7d2c65346914cf8a3aa019b43..6bd475af74e8ac3295c52464b5353653845b406b 100644 (file)
@@ -16,7 +16,7 @@
 /* *** QUIC CID handling general principles
  *
  * . CID global storage
- * CIDs generated by haproxy and reuse by the peer as DCID are stored in a
+ * CIDs generated by haproxy and reused by the peer as DCID are stored in a
  * global tree. Tree access must only be done under lock protection. Separate
  * trees are used on frontend and backend sides.
  *
@@ -331,7 +331,7 @@ int quic_cmp_cid_conn(const unsigned char *cid, size_t cid_len,
 
 /* Retrieve the thread ID associated to QUIC connection ID <cid> of length
  * <cid_len>. CID may be not found on the CID tree because it is an ODCID. In
- * this case, it will derived using client address <cli_addr> as hash
+ * this case, it will be derived using client address <cli_addr> as hash
  * parameter. However, this is done only if <pos> points to an INITIAL or 0RTT
  * packet of length <len>.
  *
index 2b661b83833fa0c866561c1f1d56f0d46249b097..81c45a8ac8988b7796c71832238181d5c847e8f9 100644 (file)
@@ -40,9 +40,9 @@ struct show_quic_ctx {
        int fields;
 };
 
-#define QC_CLI_FL_SHOW_ALL 0x0001 /* show closing/draining connections */
-#define QC_CLI_FL_SHOW_CLO 0x0002 /* show closing/draining connections */
-#define QC_CLI_FL_SHOW_BE  0x0004 /* show closing/draining connections */
+#define QC_CLI_FL_SHOW_ALL 0x0001 /* show all connections including closing ones */
+#define QC_CLI_FL_SHOW_CLO 0x0002 /* show closing connections */
+#define QC_CLI_FL_SHOW_BE  0x0004 /* show backend connections */
 
 /* Returns the output format for show quic. If specified explicitly use it as
  * set. Else format depends if filtering on a single connection instance. If
index 26c67c7d418bdec654076b3932419f9d8e552ad1..f5274d79d3ce491e611cd28453dcaa2fb2cbcc3f 100644 (file)
@@ -578,7 +578,7 @@ struct task *quic_conn_app_io_cb(struct task *t, void *context, unsigned int sta
                quic_build_post_handshake_frames(qc, &qc->ael->pktns->tx.frms);
        }
 
-       /* Retranmissions */
+       /* Retransmissions */
        if (qc->flags & QUIC_FL_CONN_RETRANS_NEEDED) {
                TRACE_STATE("retransmission needed", QUIC_EV_CONN_IO_CB, qc);
                qc->flags &= ~QUIC_FL_CONN_RETRANS_NEEDED;
@@ -794,7 +794,7 @@ struct task *quic_conn_io_cb(struct task *t, void *context, unsigned int state)
                goto out;
        }
 
-       /* Retranmissions */
+       /* Retransmissions */
        if (qc->flags & QUIC_FL_CONN_RETRANS_NEEDED) {
                TRACE_DEVEL("retransmission needed", QUIC_EV_CONN_PHPKTS, qc);
                qc->flags &= ~QUIC_FL_CONN_RETRANS_NEEDED;
@@ -852,7 +852,7 @@ struct task *quic_conn_io_cb(struct task *t, void *context, unsigned int state)
                 * waiting for HP removal AFTER the successful handshake completion.
                 * Indeed a successful handshake completion implicitly valids
                 * the peer address. In this case, one wants to process
-                * these ORTT packets AFTER the successful handshake completion.
+                * these 0RTT packets AFTER the successful handshake completion.
                 *
                 * On the contrary, when a token for address validation was received,
                 * release 0RTT packets still waiting for HP removal. These
@@ -1665,7 +1665,7 @@ static int quic_conn_init_timer(struct quic_conn *qc)
        return ret;
 }
 
-/* Rearm the idle timer or the ack timer (if not already armde) for <qc> QUIC
+/* Rearm the idle timer or the ack timer (if not already armed) for <qc> QUIC
  * connection. */
 void qc_idle_timer_do_rearm(struct quic_conn *qc, int arm_ack)
 {
index 5ab538e8bdf64351716d5f5cbaa16d98ce0a6131..1339ca37aa9d3b770f4aec73307adccc3a3698b5 100644 (file)
@@ -665,7 +665,7 @@ static int quic_build_max_streams_uni_frame(unsigned char **pos, const unsigned
        return quic_enc_int(pos, end, ms_frm->max_streams);
 }
 
-/* Parse a MAX_STREAMS frame for undirectional streams at <pos> buffer position with <end>
+/* Parse a MAX_STREAMS frame for unidirectional streams at <pos> buffer position with <end>
  * as end into <frm> frame.
  * Return 1 if succeeded (enough room to parse this frame), 0 if not.
  */
@@ -978,7 +978,7 @@ static int quic_build_connection_close_app_frame(unsigned char **pos, const unsi
        return 1;
 }
 
-/* Parse a CONNECTION_CLOSE frame at QUIC layer at <pos> buffer position with <end> as end into <frm> frame.
+/* Parse a CONNECTION_CLOSE frame at application layer at <pos> buffer position with <end> as end into <frm> frame.
  * Note there exist two types of CONNECTION_CLOSE frame, one for the application layer
  * and another at QUIC layer.
  * Return 1 if succeeded (enough room at <pos> buffer position to parse this frame), 0 if not.
index ce9ac252a61f300a4abdc8f66ba9372bf7020cb0..1747b05c89fbbd79138a8d40dd18a34ac36c9499 100644 (file)
@@ -521,7 +521,7 @@ int SSL_set_quic_transport_params(SSL *ssl, const uint8_t *params, size_t params
        struct quic_conn *qc = SSL_get_ex_data(ssl, ssl_qc_app_data_index);
        /* The local transport parameters are stored into the quic_conn object.
         * There is no need to add an intermediary to store pointers to these
-        * transport paraemters.
+        * transport parameters.
         */
        TRACE_ENTER(QUIC_EV_CONN_SSL_COMPAT, qc);
        TRACE_LEAVE(QUIC_EV_CONN_SSL_COMPAT, qc);
index ee4d662db2979942c3130face4345aee01cd287d..f4d12e180af05debe740ff5e291d7caed3401543 100644 (file)
@@ -113,8 +113,8 @@ static void qc_dup_pkt_frms(struct quic_conn *qc,
        TRACE_LEAVE(QUIC_EV_CONN_PRSAFRM, qc);
 }
 
-/* Boolean function which return 1 if <pkt> TX packet is only made of
- * already acknowledged frame.
+/* Boolean function which returns 1 if <pkt> TX packet is only made of
+ * already acknowledged frames.
  */
 static inline int qc_pkt_with_only_acked_frms(struct quic_tx_packet *pkt)
 {
@@ -185,7 +185,7 @@ void qc_prep_fast_retrans(struct quic_conn *qc,
 
 /* Prepare a fast retransmission during a handshake after a client
  * has resent Initial packets. According to the RFC a server may retransmit
- * Initial packets send them coalescing with others (Handshake here).
+ * Initial packets, sending them coalesced with others (Handshake here).
  * (Listener only function).
  */
 void qc_prep_hdshk_fast_retrans(struct quic_conn *qc,
@@ -250,7 +250,7 @@ void qc_prep_hdshk_fast_retrans(struct quic_conn *qc,
 
        qel->pktns->tx.pto_probe += 1;
 
-       /* No risk to loop here, #packet per datagram is bounded */
+       /* No risk to loop here, #packets per datagram is bounded */
  requeue:
        TRACE_PROTO("duplicating packet", QUIC_EV_CONN_PRSAFRM, qc, NULL, &pkt->pn_node.key);
        qc_dup_pkt_frms(qc, &pkt->frms, tmp);
index 0da0aadf63bdd8aec5f4a51dcfe3f9ffb1cdfd6c..d73a4a7e420a0bcba6e0c768c015e7d040e79f19 100644 (file)
@@ -24,7 +24,7 @@ int quic_init_exec_rules(struct listener *li, struct quic_dgram *dgram)
        px = li->bind_conf->frontend;
 
        /* Initialize session elements specific to the current datagram. All
-        * others members are set to 0 thanks to static storage class.
+        * other members are set to 0 thanks to the static storage class.
         */
        rule_sess.fe = px;
        rule_sess.listener = li;
@@ -146,7 +146,9 @@ void quic_init_actions_register(struct action_kw_list *kw_list)
        act_add_list(&quic_init_actions_list.list, kw_list);
 }
 
-/* Return the struct quic-initial action associated to a keyword. */
+/* Return the action keyword associated with <kw> from the registered
+ * quic-initial action keywords, or NULL if not found.
+ */
 struct action_kw *action_quic_init_custom(const char *kw)
 {
        return action_lookup(&quic_init_actions_list.list, kw);
index abd9e9fef7d6f8ec8c1643a8d097de7a58cc6653..f4c39b40eb0abc43ea511ea09eef5faad00814ab 100644 (file)
@@ -642,7 +642,7 @@ static int qc_handle_strm_frm(struct quic_rx_packet *pkt,
        ret = qcc_recv(qc->qcc, strm_frm->id, strm_frm->len,
                       strm_frm->offset, fin, (char *)strm_frm->data);
 
-       /* frame rejected - packet must not be acknowledeged */
+       /* frame rejected - packet must not be acknowledged */
        TRACE_LEAVE(QUIC_EV_CONN_PRSFRM, qc);
        return !ret;
 }
index a2d0020cd31642dd63f21cd2c78c450236d511a7..6b0a2e297b5c1c319d89fa2a623c5dc82c8db7c0 100644 (file)
@@ -306,7 +306,9 @@ static void qc_stream_buf_consume(struct qc_stream_buf *stream_buf,
                if (ack->offset_node.key > stream->ack_offset)
                        break;
 
-               /* For released buf, room count is decremented on buffered ACK consumption. */
+               /* For the active buf, room count is decremented on buffered ACK
+                * consumption.
+                */
                if (stream_buf == stream->buf)
                        stream_buf->room = MAX((int64_t)(stream_buf->room - ack->len), 0);
 
@@ -483,7 +485,7 @@ struct buffer *qc_stream_buf_alloc(struct qc_stream_desc *stream,
  */
 struct buffer *qc_stream_buf_realloc(struct qc_stream_desc *stream)
 {
-       /* This function is reserved to convert a big buffer to a smaller one. */
+       /* This function is reserved to convert a small buffer to a standard one. */
        BUG_ON(!stream->buf || !stream->buf->sbuf);
 
        /* This function can only be used if targeted buffer is empty. */
index 54d51ee919a1dda24574be5b2547446209c6773c..3a777544464a800a12cad5107f1883984b6cbb2c 100644 (file)
@@ -194,7 +194,7 @@ int ssl_sock_switchctx_cbk(SSL *ssl, int *al, void *arg)
                                               &extension_data, &extension_len))
 #endif
                {
-                       /* This is not redundant. It we only return 0 without setting
+                       /* This is not redundant. If we only return 0 without setting
                         * <*al>, this has as side effect to generate another TLS alert
                         * which would be set after calling quic_set_tls_alert().
                         */
@@ -444,7 +444,7 @@ int ssl_sock_switchctx_cbk(SSL *ssl, int *al, void *arg)
        }
 
 sni_lookup:
-       /* we need to transform this a NULL-ended string in lowecase */
+       /* we need to transform this into a NULL-terminated string in lowercase */
        for (i = 0; i < trash.size && i < servername_len; i++)
                trash.area[i] = tolower((unsigned char)servername[i]);
        trash.area[i] = 0;
@@ -556,7 +556,7 @@ int ssl_sock_switchctx_cbk(SSL *ssl, int *al, void *priv)
                /* Look for the QUIC transport parameters. */
                SSL_get_peer_quic_transport_params(ssl, &extension_data, &extension_len);
                if (extension_len == 0) {
-                       /* This is not redundant. It we only return 0 without setting
+                       /* This is not redundant. If we only return 0 without setting
                         * <*al>, this has as side effect to generate another TLS alert
                         * which would be set after calling quic_set_tls_alert().
                         */
@@ -660,8 +660,8 @@ sni_lookup:
 #endif /* (!) OPENSSL_IS_BORINGSSL */
 
 #if defined(USE_OPENSSL_WOLFSSL)
-/* This implement the equivalent of the clientHello Callback but using the cert_cb.
- * WolfSSL is able to extract the sigalgs and ciphers of the client byt using the API
+/* This implements the equivalent of the clientHello Callback but using the cert_cb.
+ * WolfSSL is able to extract the sigalgs and ciphers of the client by using the API
  * provided in https://github.com/wolfSSL/wolfssl/pull/6963
  *
  * Not activated for now since the PR is not merged.
@@ -739,7 +739,7 @@ int ssl_sock_switchctx_wolfSSL_cbk(WOLFSSL* ssl, void* arg)
 
 sni_lookup:
 
-       /* we need to transform this into a NULL-ended string in lowecase */
+       /* we need to transform this into a NULL-terminated string in lowercase */
        for (i = 0; i < trash.size && servername[i] != '\0'; i++)
                trash.area[i] = tolower((unsigned char)servername[i]);
        trash.area[i] = 0;
index 9b25f263c1c959960e395366151ab18e85b3c2b6..15ce41f3215d3623736a5e4888f2f011707f8c35 100644 (file)
@@ -516,7 +516,7 @@ static void tcpcheck_expect_onsuccess_message(struct buffer *msg, struct check *
 
        /* Follows these step to produce the info message:
         *     1. if info field is already provided, copy it
-        *     2. if the expect rule provides an onsucces log-format string,
+        *     2. if the expect rule provides an onsuccess log-format string,
         *        use it to produce the message
         *     3. the expect rule is part of a protocol check (http, redis, mysql...), do nothing
         *     4. Otherwise produce the generic tcp-check info message
@@ -3906,7 +3906,7 @@ int tcpcheck_add_http_rule(struct tcpcheck_rule *chk, struct tcpcheck_ruleset *r
        struct tcpcheck_rule *r;
 
        /* the implicit send rule coming from an "option httpchk" line must be
-        * merged with the first explici http-check send rule, if
+        * merged with the first explicit http-check send rule, if
         * any. Depending on the declaration order some tests are required.
         *
         * Some tests are also required for other kinds of http-check rules to be
@@ -3943,7 +3943,7 @@ int tcpcheck_add_http_rule(struct tcpcheck_rule *chk, struct tcpcheck_ruleset *r
                }
        }
        else {
-               /* Tries to add an explicit http-check rule. First of all we check the typefo the
+               /* Tries to add an explicit http-check rule. First of all we check the type of the
                 * last inserted rule to be sure it is valid. Then for send rule, we try to merge it
                 * with an existing implicit send rule, if any. At the end, if there is no error,
                 * the rule is appended to the list.
@@ -4050,7 +4050,7 @@ static int check_tcpcheck_ruleset(struct proxy *px, struct tcpcheck_ruleset *rs)
        }
 
        /* Now, back again on HTTP ruleset. Try to resolve the sni log-format
-        * string if necessary, but onlu for implicit connect rules, by getting
+        * string if necessary, but only for implicit connect rules, by getting
         * it from the following send rule.
         */
        if ((rs->flags & TCPCHK_RULES_PROTO_CHK) == TCPCHK_RULES_HTTP_CHK) {
@@ -4059,7 +4059,7 @@ static int check_tcpcheck_ruleset(struct proxy *px, struct tcpcheck_ruleset *rs)
                list_for_each_entry(chk, &rs->rules, list) {
                        if (chk->action == TCPCHK_ACT_CONNECT && !chk->connect.sni &&
                            (chk->connect.options & TCPCHK_OPT_IMPLICIT)) {
-                               /* Only eval connect rule with no explici SNI */
+                               /* Only eval connect rule with no explicit SNI */
                                connect = &chk->connect;
                        }
                        else if (connect && chk->action == TCPCHK_ACT_SEND) {