Mercurial > hg > nginx
comparison src/event/ngx_event_udp.c @ 8733:385d511b5064 quic
QUIC: fixed udp buffer initialization.
The start field is used to check if the QUIC packet is first in the datagram.
This fixes stateless reset detection.
author | Vladimir Homutov <vl@nginx.com> |
---|---|
date | Tue, 30 Mar 2021 14:33:43 +0300 |
parents | db58c7ef1d7c |
children | c61fcdc1b8e3 |
comparison
equal
deleted
inserted
replaced
8732:db58c7ef1d7c | 8733:385d511b5064 |
---|---|
277 | 277 |
278 ngx_memzero(&buf, sizeof(ngx_buf_t)); | 278 ngx_memzero(&buf, sizeof(ngx_buf_t)); |
279 | 279 |
280 buf.pos = buffer; | 280 buf.pos = buffer; |
281 buf.last = buffer + n; | 281 buf.last = buffer + n; |
282 buf.start = buf.pos; | |
283 buf.end = buffer + sizeof(buffer); | |
282 | 284 |
283 rev = c->read; | 285 rev = c->read; |
284 | 286 |
285 c->udp->buffer = &buf; | 287 c->udp->buffer = &buf; |
286 | 288 |