# HG changeset patch
# User Vladimir Khomutov <vl@inspert.ru>
# Date 1695386443 -10800
# Fri Sep 22 15:40:43 2023 +0300
# Node ID 974ba23e68909ba708616410aa77074213d4d1e5
# Parent 5741eddf82e826766cd0f5ec7c6fe383145ca581
QUIC: handle add_handhshake_data() callback errors in compat.
The error may be triggered by incorrect transport parameter sent by client.
The expected behaviour in this case is to close connection complaining
about incorrect parameter. Currently the connection just times out.
diff --git a/src/event/quic/ngx_event_quic_openssl_compat.c b/src/event/quic/ngx_event_quic_openssl_compat.c
--- a/src/event/quic/ngx_event_quic_openssl_compat.c
+++ b/src/event/quic/ngx_event_quic_openssl_compat.c
@@ -408,7 +408,10 @@ ngx_quic_compat_message_callback(int wri
"quic compat tx %s len:%uz ",
ngx_quic_level_name(level), len);
- (void) com->method->add_handshake_data(ssl, level, buf, len);
+ if (com->method->add_handshake_data(ssl, level, buf, len) != 1) {
+ ngx_post_event(&qc->close, &ngx_posted_events);
+ return;
+ }
break;
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
https://mailman.nginx.org/mailman/listinfo/nginx-devel