Welcome! Log In Create A New Profile

Advanced

Re: [PATCH] Added logging to PROXY protocol write buffer check

Sergey Kandaurov
November 21, 2022 10:32AM
> On 18 Nov 2022, at 17:53, Maxim Dounin <mdounin@mdounin.ru> wrote:
>
> Hello!
>
> On Wed, Nov 09, 2022 at 01:18:51PM +0300, Maxim Dounin wrote:
>
>> On Tue, Nov 08, 2022 at 02:45:10PM +0400, Roman Arutyunyan wrote:
>>
>>> On Tue, Nov 08, 2022 at 12:46:42PM +0300, Maxim Dounin wrote:
>>>> # HG changeset patch
>>>> # User Maxim Dounin <mdounin@mdounin.ru>
>>>> # Date 1667891773 -10800
>>>> # Tue Nov 08 10:16:13 2022 +0300
>>>> # Node ID 22c65e5f1c372f251e2cefdd7aae743794ecfa9e
>>>> # Parent 17d6a537fb1bb587e4de22961bf5be5f0c648fa8
>>>> Added logging to PROXY protocol write buffer check.
>>>>
>>>> The check is not expected to fail unless there is a bug in the calling
>>>> code. But given the check is here, it should log an alert if it fails
>>>> instead of silently closing the connection.
>>>>
>>>> diff --git a/src/core/ngx_proxy_protocol.c b/src/core/ngx_proxy_protocol.c
>>>> --- a/src/core/ngx_proxy_protocol.c
>>>> +++ b/src/core/ngx_proxy_protocol.c
>>>> @@ -282,6 +282,8 @@ ngx_proxy_protocol_write(ngx_connection_
>>>> ngx_uint_t port, lport;
>>>>
>>>> if (last - buf < NGX_PROXY_PROTOCOL_V1_MAX_HEADER) {
>>>> + ngx_log_error(NGX_LOG_ALERT, c->log, 0,
>>>> + "too small buffer for PROXY protocol");
>>>> return NULL;
>>>> }
>>>>
>>>
>>> Looks fine
>>
>> Pushed to http://mdounin.ru/hg/nginx along with the second patch,
>> thnx.
>
> Ping. That's still not pulled into http://hg.nginx.org/nginx.

Pulled now, sorry for the delay.

--
Sergey Kandaurov

_______________________________________________
nginx-devel mailing list -- nginx-devel@nginx.org
To unsubscribe send an email to nginx-devel-leave@nginx.org
Subject Author Views Posted

[PATCH] Added logging to PROXY protocol write buffer check

Maxim Dounin 256 November 08, 2022 04:48AM

Re: [PATCH] Added logging to PROXY protocol write buffer check

Roman Arutyunyan 21 November 08, 2022 05:46AM

Re: [PATCH] Added logging to PROXY protocol write buffer check

Maxim Dounin 25 November 09, 2022 05:20AM

Re: [PATCH] Added logging to PROXY protocol write buffer check

Maxim Dounin 16 November 18, 2022 08:56AM

Re: [PATCH] Added logging to PROXY protocol write buffer check

Sergey Kandaurov 12 November 21, 2022 10:32AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 82
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready