]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: quic: Comment fix about the token found in Initial packets
authorFrédéric Lécaille <flecaille@haproxy.com>
Tue, 25 Jan 2022 20:21:56 +0000 (21:21 +0100)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Thu, 27 Jan 2022 15:37:55 +0000 (16:37 +0100)
Mention that the token is sent only by servers in both server and listener
packet parsers.
Remove a "TO DO" section in listener packet parser because there is nothing
more to do in this function about the token

src/xprt_quic.c

index d021f62d10421b4f18c8d8929927e35fcc0364f7..8a9b4f29379c4ce7e899e9ef5f3b8d1a1d91fcb0 100644 (file)
@@ -3942,7 +3942,8 @@ static ssize_t qc_srv_pkt_rcv(unsigned char **buf, const unsigned char *end,
                         * So, a client which receives an Initial packet with a token
                         * MUST discard the packet or generate a connection error with
                         * PROTOCOL_VIOLATION as type.
-                        * The token must be provided in a Retry packet or NEW_TOKEN frame.
+                        * The token may be provided in a Retry packet or NEW_TOKEN frame
+                        * only by the QUIC server.
                         */
                        pkt->token_len = token_len;
                }
@@ -4429,12 +4430,8 @@ static ssize_t qc_lstnr_pkt_rcv(unsigned char *buf, const unsigned char *end,
                                goto err;
                        }
 
-                       /* XXX TO DO XXX 0 value means "the token is not present".
-                        * A server which sends an Initial packet must not set the token.
-                        * So, a client which receives an Initial packet with a token
-                        * MUST discard the packet or generate a connection error with
-                        * PROTOCOL_VIOLATION as type.
-                        * The token must be provided in a Retry packet or NEW_TOKEN frame.
+                       /* The token may be provided in a Retry packet or NEW_TOKEN frame
+                        * only by the QUIC server.
                         */
                        pkt->token_len = token_len;