Mercurial > hg > nginx
comparison src/event/ngx_event_quic_protection.c @ 8265:d45325e90221 quic
Limit output QUIC packets with client max_packet_size.
Additionally, receive larger packets than 512 bytes.
author | Roman Arutyunyan <arut@nginx.com> |
---|---|
date | Mon, 23 Mar 2020 18:47:17 +0300 |
parents | c217a907ce42 |
children | f85749b60e58 |
comparison
equal
deleted
inserted
replaced
8264:c58bbe31e87d | 8265:d45325e90221 |
---|---|
695 | 695 |
696 log = pool->log; | 696 log = pool->log; |
697 | 697 |
698 out.len = payload->len + EVP_GCM_TLS_TAG_LEN; | 698 out.len = payload->len + EVP_GCM_TLS_TAG_LEN; |
699 | 699 |
700 ad.data = ngx_alloc(346 /*max header*/, log); | 700 ad.data = ngx_alloc(NGX_QUIC_MAX_LONG_HEADER, log); |
701 if (ad.data == 0) { | 701 if (ad.data == 0) { |
702 return NGX_ERROR; | 702 return NGX_ERROR; |
703 } | 703 } |
704 | 704 |
705 ad.len = ngx_quic_create_long_header(pkt, &ad, out.len, &pnp); | 705 ad.len = ngx_quic_create_long_header(pkt, &ad, out.len, &pnp); |
764 | 764 |
765 log = pool->log; | 765 log = pool->log; |
766 | 766 |
767 out.len = payload->len + EVP_GCM_TLS_TAG_LEN; | 767 out.len = payload->len + EVP_GCM_TLS_TAG_LEN; |
768 | 768 |
769 ad.data = ngx_alloc(25 /*max header*/, log); | 769 ad.data = ngx_alloc(NGX_QUIC_MAX_SHORT_HEADER, log); |
770 if (ad.data == 0) { | 770 if (ad.data == 0) { |
771 return NGX_ERROR; | 771 return NGX_ERROR; |
772 } | 772 } |
773 | 773 |
774 p = ad.data; | 774 p = ad.data; |