Welcome! Log In Create A New Profile

Advanced

Re: [PATCH] Prefer address family matching to local address in resolver (ticket #1535)

Maxim Dounin
January 19, 2022 11:24AM
Hello!

On Wed, Jan 19, 2022 at 04:08:32PM +0100, Lukas Lihotzki via nginx-devel wrote:

> # HG changeset patch
> # User Lukas Lihotzki <lukas@lihotzki.de>
> # Date 1642576371 -3600
> # Wed Jan 19 08:12:51 2022 +0100
> # Node ID f922980f06b1162ae933c99c03bef09cfc12582f
> # Parent aeab41dfd2606dd36cabbf01f1472726e27e8aea
> Prefer address family matching to local address in resolver (ticket #1535).
>
> Without this change, upstream connections fail randomly for dual-stack
> host names when specifying a proxy_bind address (ticket #1535).
>
> This changeset adds two flags for avoiding resolving to either IPv4 or IPv6
> addresses. stream and http set these flags based on the proxy_bind address.
> Avoided addresses are still returned if there are none of the other family, so
> the same error message as before is produced when connecting is impossible.

Thank you for the patch.

Suggested change looks wrong to me though, as it only addresses a
particular use case when the name is resolved dynamically at run
time using resolver. In particular, it won't address the exact
configuration listed in ticket #1535.

If the goal is to only address dynamic resolution, a better idea
might be to use "resolver ... ipv6=off;" configured explicitly.
Or, if you want to use only IPv6 addresses instead, introduce a
similar option to only resolve IPv4 addresses: as previously
discussed in ticket #1330, it might be beneficial for IPv6-only
hosts in other cases as well.

--
Maxim Dounin
http://mdounin.ru/
_______________________________________________
nginx-devel mailing list -- nginx-devel@nginx.org
To unsubscribe send an email to nginx-devel-leave@nginx.org
Subject Author Views Posted

[PATCH] Prefer address family matching to local address in resolver (ticket #1535)

Lukas Lihotzki via nginx-devel 144 January 19, 2022 10:18AM

Re: [PATCH] Prefer address family matching to local address in resolver (ticket #1535)

Maxim Dounin 48 January 19, 2022 11:24AM



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

Online Users

Guests: 65
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