Mercurial > hg > nginx
comparison src/core/ngx_proxy_protocol.c @ 8099:17d6a537fb1b
Increased maximum read PROXY protocol header size.
Maximum size for reading the PROXY protocol header is increased to 4096 to
accommodate a bigger number of TLVs, which are supported since cca4c8a715de.
Maximum size for writing the PROXY protocol header is not changed since only
version 1 is currently supported.
author | Roman Arutyunyan <arut@nginx.com> |
---|---|
date | Wed, 02 Nov 2022 13:46:16 +0400 |
parents | aa663cc2a77d |
children | 251daa98cc87 |
comparison
equal
deleted
inserted
replaced
8098:a2924855f453 | 8099:17d6a537fb1b |
---|---|
279 u_char * | 279 u_char * |
280 ngx_proxy_protocol_write(ngx_connection_t *c, u_char *buf, u_char *last) | 280 ngx_proxy_protocol_write(ngx_connection_t *c, u_char *buf, u_char *last) |
281 { | 281 { |
282 ngx_uint_t port, lport; | 282 ngx_uint_t port, lport; |
283 | 283 |
284 if (last - buf < NGX_PROXY_PROTOCOL_MAX_HEADER) { | 284 if (last - buf < NGX_PROXY_PROTOCOL_V1_MAX_HEADER) { |
285 return NULL; | 285 return NULL; |
286 } | 286 } |
287 | 287 |
288 if (ngx_connection_local_sockaddr(c, NULL, 0) != NGX_OK) { | 288 if (ngx_connection_local_sockaddr(c, NULL, 0) != NGX_OK) { |
289 return NULL; | 289 return NULL; |