Re: Address selection policy in dual-stack environments

2015-10-01 Thread Dmitry Sivachenko
> On 30 сент. 2015 г., at 23:28, Willy Tarreau wrote: > > > I think that you did a good job and that you're perfectly right. I even > checked on one of my older systems and the text was the same in 2008. > > Could you please write a commit message describing the initial issue >

Re: Address selection policy in dual-stack environments

2015-10-01 Thread Willy Tarreau
On Thu, Oct 01, 2015 at 02:51:58PM +0300, Dmitry Sivachenko wrote: > When first parameter to getaddrinfo() is not NULL (it is always not NULL in > str2ip()), on Linux AI_PASSIVE value for ai_flags is ignored. > On FreeBSD, when AI_PASSIVE is specified and hostname parameter is not NULL, >

Re: Address selection policy in dual-stack environments

2015-09-30 Thread Willy Tarreau
Hi Dmitry! On Wed, Sep 30, 2015 at 01:33:56PM +0300, Dmitry Sivachenko wrote: > > > On 29 . 2015 ??., at 23:06, Willy Tarreau wrote: > > > > On Tue, Sep 29, 2015 at 10:59:15PM +0300, Dmitry Sivachenko wrote: > >>> I *think* that getaddrinfo() provides this. You can try to

Re: Address selection policy in dual-stack environments

2015-09-30 Thread Dmitry Sivachenko
> On 29 сент. 2015 г., at 23:06, Willy Tarreau wrote: > > On Tue, Sep 29, 2015 at 10:59:15PM +0300, Dmitry Sivachenko wrote: >>> I *think* that getaddrinfo() provides this. You can try to build by >>> adding USE_GETADDRINFO=1 to your makefile. It's not enabled by default >>>

Address selection policy in dual-stack environments

2015-09-29 Thread Dmitry Sivachenko
Hello, in case when machine has both A and records, there is an address selection policy algorithm which determines which address to use first. https://www.freebsd.org/cgi/man.cgi?query=ip6addrctl=8 I use it in "prefer ipv4" form, to use ipv4 first when available. All programs like ssh

Re: Address selection policy in dual-stack environments

2015-09-29 Thread Willy Tarreau
Hi Dmitry, On Tue, Sep 29, 2015 at 08:08:51PM +0300, Dmitry Sivachenko wrote: > Hello, > > in case when machine has both A and records, there is an address > selection policy algorithm which determines which address to use first. > https://www.freebsd.org/cgi/man.cgi?query=ip6addrctl=8 >

Re: Address selection policy in dual-stack environments

2015-09-29 Thread Dmitry Sivachenko
> On 29 сент. 2015 г., at 21:26, Willy Tarreau wrote: > > Hi Dmitry, > > On Tue, Sep 29, 2015 at 08:08:51PM +0300, Dmitry Sivachenko wrote: >> Hello, >> >> in case when machine has both A and records, there is an address >> selection policy algorithm which determines which