Mercurial > hg > nginx-quic
comparison src/mail/ngx_mail_proxy_module.c @ 8959: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 | b38728495e1a |
children | a5e6e8510634 |
comparison
equal
deleted
inserted
replaced
8958:a2924855f453 | 8959:17d6a537fb1b |
---|---|
888 ngx_mail_proxy_send_proxy_protocol(ngx_mail_session_t *s) | 888 ngx_mail_proxy_send_proxy_protocol(ngx_mail_session_t *s) |
889 { | 889 { |
890 u_char *p; | 890 u_char *p; |
891 ssize_t n, size; | 891 ssize_t n, size; |
892 ngx_connection_t *c; | 892 ngx_connection_t *c; |
893 u_char buf[NGX_PROXY_PROTOCOL_MAX_HEADER]; | 893 u_char buf[NGX_PROXY_PROTOCOL_V1_MAX_HEADER]; |
894 | 894 |
895 s->connection->log->action = "sending PROXY protocol header to upstream"; | 895 s->connection->log->action = "sending PROXY protocol header to upstream"; |
896 | 896 |
897 ngx_log_debug0(NGX_LOG_DEBUG_MAIL, s->connection->log, 0, | 897 ngx_log_debug0(NGX_LOG_DEBUG_MAIL, s->connection->log, 0, |
898 "mail proxy send PROXY protocol header"); | 898 "mail proxy send PROXY protocol header"); |
899 | 899 |
900 p = ngx_proxy_protocol_write(s->connection, buf, | 900 p = ngx_proxy_protocol_write(s->connection, buf, |
901 buf + NGX_PROXY_PROTOCOL_MAX_HEADER); | 901 buf + NGX_PROXY_PROTOCOL_V1_MAX_HEADER); |
902 if (p == NULL) { | 902 if (p == NULL) { |
903 ngx_mail_proxy_internal_server_error(s); | 903 ngx_mail_proxy_internal_server_error(s); |
904 return NGX_ERROR; | 904 return NGX_ERROR; |
905 } | 905 } |
906 | 906 |