Welcome! Log In Create A New Profile

Advanced

Re: [quic] ngx_quic_input_handler Segmentation fault because c->udp->dgram is null

Vladimir Homutov
January 27, 2022 08:48AM
On Thu, Jan 27, 2022 at 04:33:08AM +0000, Gao,Yan(媒体云) wrote:
> > The main quic connection is created in ngx_quic_new_connection(), which
> > calls ngx_quic_open_sockets() and it sets c->udp for the first time.
>
> > When packet arrives, c->udp is updated by ngx_lookup_udp_connection().
>
> > The main connection does not have c->quic set; this is used in stream
> > connections. To access main connection from quic stream, c->quic->parent
> > may be used.
>
> ngx_event_recvmsg->(ls->handler) ngx_http_init_connection->ngx_http_v3_init:
> if (c->quic == NULL) {
> h3scf->quic.timeout = clcf->keepalive_timeout;
> ngx_quic_run(c, &h3scf->quic);
> return;
> }
>
> And, why check c->quic == NULL, as it is never set

first time you get there with main nginx connection, when a first QUIC
packet arrives. Thus test c->quic. and if it is NULL it means we need
to create main quic connection and proceed with the handshake.

When the handshake is complete, a stream will be created, and the
ngx_quic_init_stream_handler() will be called which will invoke
listening handler, and we will return into ngx_http_v3_init() with
stream connection that has c->quic set and follow the other path.
_______________________________________________
nginx-devel mailing list -- nginx-devel@nginx.org
To unsubscribe send an email to nginx-devel-leave@nginx.org
Subject Author Views Posted

Re: [quic] ngx_quic_input_handler Segmentation fault because c->udp->dgram is null

gaoyan09 500 January 26, 2022 12:00AM

Re: [quic] ngx_quic_input_handler Segmentation fault because c->udp->dgram is null

gaoyan09 196 January 26, 2022 01:16AM

Re: [quic] ngx_quic_input_handler Segmentation fault because c->udp->dgram is null

gaoyan09 223 January 26, 2022 01:40AM

Re: [quic] ngx_quic_input_handler Segmentation fault because c->udp->dgram is null

Vladimir Homutov 145 January 26, 2022 03:04AM

Re: [quic] ngx_quic_input_handler Segmentation fault because c->udp->dgram is null

gaoyan09 204 January 26, 2022 05:02AM

Re: [quic] ngx_quic_input_handler Segmentation fault because c->udp->dgram is null

Vladimir Homutov 178 January 26, 2022 07:18AM

Re: [quic] ngx_quic_input_handler Segmentation fault because c->udp->dgram is null

gaoyan09 155 January 26, 2022 11:36PM

Re: [quic] ngx_quic_input_handler Segmentation fault because c->udp->dgram is null

Vladimir Homutov 135 January 27, 2022 08:48AM

Re: [quic] ngx_quic_input_handler Segmentation fault because c->udp->dgram is null

gaoyan09 156 January 27, 2022 10:32PM

Re: [quic] ngx_quic_input_handler Segmentation fault because c->udp->dgram is null

Vladimir Homutov 138 January 28, 2022 04:02AM

Re: [quic] ngx_quic_input_handler Segmentation fault because c->udp->dgram is null

gaoyan09 148 January 28, 2022 09:12AM

Re: [quic] ngx_quic_input_handler Segmentation fault because c->udp->dgram is null

Vladimir Homutov 161 January 31, 2022 02:22AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 152
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready