Welcome! Log In Create A New Profile

Advanced

Re: [PATCH] Core: fix conversion of IPv4-mapped IPv6 addresses

Sergey Kandaurov
March 27, 2024 01:52PM
> On 21 Mar 2024, at 10:53, Piotr Sikora via nginx-devel <nginx-devel@nginx.org> wrote:
>
> Hi Sergey,
>
>> The "shift" remark doesn't describe a problem in details.
>
> It's not a remark, it's the name of the UndefinedBehaviorSanitizer
> check that caught the issue [1].
>

Thanks for clarification, restored.

>> @@ -507,7 +507,7 @@ ngx_cidr_match(struct sockaddr *sa, ngx_
>>
>> p = inaddr6->s6_addr;
>>
>> - inaddr = p[12] << 24;
>> + inaddr = (in_addr_t) p[12] << 24;
>> inaddr += p[13] << 16;
>> inaddr += p[14] << 8;
>> inaddr += p[15];
>
> While this minimizes the diff and silences the error at hand,
> I find my version more readable.
>
> But you're obviously welcome to commit either version.
>
> [1] https://clang.llvm.org/docs/UndefinedBehaviorSanitizer.html
>

Pushed with commit log refinements, thanks.

--
Sergey Kandaurov
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
https://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[PATCH] Core: fix conversion of IPv4-mapped IPv6 addresses

Piotr Sikora via nginx-devel 280 February 27, 2024 08:24PM

Re: [PATCH] Core: fix conversion of IPv4-mapped IPv6 addresses

Sergey Kandaurov 22 March 15, 2024 12:14PM

Re: [PATCH] Core: fix conversion of IPv4-mapped IPv6 addresses

Sergey Kandaurov 23 March 18, 2024 09:18AM

Re: [PATCH] Core: fix conversion of IPv4-mapped IPv6 addresses

Piotr Sikora via nginx-devel 19 March 21, 2024 02:56AM

Re: [PATCH] Core: fix conversion of IPv4-mapped IPv6 addresses

Sergey Kandaurov 36 March 27, 2024 01:52PM



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

Online Users

Guests: 185
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready