aboutsummaryrefslogtreecommitdiff
path: root/src/mail/ngx_mail_proxy_module.c
diff options
context:
space:
mode:
authorRoman Arutyunyan <arut@nginx.com>2022-11-02 13:46:16 +0400
committerRoman Arutyunyan <arut@nginx.com>2022-11-02 13:46:16 +0400
commit7600ca028644d3ecc7e62499d71bbe21fe3bda0d (patch)
treefc51ec5440b2dbf3c3b2efd4d9341a11b588d955 /src/mail/ngx_mail_proxy_module.c
parentd7483bf1af704c1ef55e706ed3e44a09ee1e1f9b (diff)
downloadnginx-7600ca028644d3ecc7e62499d71bbe21fe3bda0d.tar.gz
nginx-7600ca028644d3ecc7e62499d71bbe21fe3bda0d.zip
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.
Diffstat (limited to 'src/mail/ngx_mail_proxy_module.c')
-rw-r--r--src/mail/ngx_mail_proxy_module.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mail/ngx_mail_proxy_module.c b/src/mail/ngx_mail_proxy_module.c
index a7ab0776e..06679d4e0 100644
--- a/src/mail/ngx_mail_proxy_module.c
+++ b/src/mail/ngx_mail_proxy_module.c
@@ -890,7 +890,7 @@ ngx_mail_proxy_send_proxy_protocol(ngx_mail_session_t *s)
u_char *p;
ssize_t n, size;
ngx_connection_t *c;
- u_char buf[NGX_PROXY_PROTOCOL_MAX_HEADER];
+ u_char buf[NGX_PROXY_PROTOCOL_V1_MAX_HEADER];
s->connection->log->action = "sending PROXY protocol header to upstream";
@@ -898,7 +898,7 @@ ngx_mail_proxy_send_proxy_protocol(ngx_mail_session_t *s)
"mail proxy send PROXY protocol header");
p = ngx_proxy_protocol_write(s->connection, buf,
- buf + NGX_PROXY_PROTOCOL_MAX_HEADER);
+ buf + NGX_PROXY_PROTOCOL_V1_MAX_HEADER);
if (p == NULL) {
ngx_mail_proxy_internal_server_error(s);
return NGX_ERROR;