> On 22 Feb 2023, at 17:15, Roman Arutyunyan <a...@nginx.com> wrote: > > On Tue, Feb 21, 2023 at 05:54:42PM +0400, Sergey Kandaurov wrote: > > [..] > >> # HG changeset patch >> # User Sergey Kandaurov <pluk...@nginx.com> >> # Date 1676987626 -14400 >> # Tue Feb 21 17:53:46 2023 +0400 >> # Branch quic >> # Node ID e012c3999592fc935bfc786a232903567c512bfe >> # Parent baada8d864cbedc7557b879f89eee5c412f3ca85 >> QUIC: moved "handshake failed" reason to send_alert. >> >> A QUIC handshake may fail for a variety of reasons, which breaks down into >> several cases, in order of precedence: > >> - generally, the error code is reported with the send_alert callback >> - else, our own QUIC checks may set specific error code / reason phrase >> - as a last resort, handshake may fail for some reason, which falls back >> to send INTERNAL_ERROR in the CONNECTION_CLOSE frame. >> Now, in the first case, both error code and generic phrase are set in the >> send_alert callback, to preserve a specific reason phrase from overriding. >> Additionally, absent error code / reason phrase are now converted to just >> INTERNAL_ERROR, without reason phrase set. > i> >> Reported by Jiuzhou Cui. > > I suggest the following commit message: > > QUIC: moved "handshake failed" reason to send_alert. > > A QUIC handshake may fail for a variety of reasons, which breaks down into > several cases, in order of precedence: > > - a handshake error which leads to a send_alert call > - an error triggered by add_handshake_data callback > - internal errors (allocation etc) > > Previously, in the first case, only error code was set in send_alert callback. > Now "handshake failed" is set there as a reason. In the second case, error > code and reason are set by add_handshake_data. In the last case, setting > error reason is now removed. Returning NGX_ERROR will lead to closing the > connection with just INTERNAL_ERROR. > > Reported by Jiuzhou Cui.
Thanks, applied with minor adjustments. https://hg.nginx.org/nginx-quic/rev/cb7dc35ed428 -- Sergey Kandaurov _______________________________________________ nginx-devel mailing list nginx-devel@nginx.org https://mailman.nginx.org/mailman/listinfo/nginx-devel