Re: [PATCH] rpc: 'getaddrinfo' function support both IPv4 and IPv6

2020-03-02 Thread Daniel P . Berrangé
On Mon, Mar 02, 2020 at 05:54:42PM +0100, Ján Tomko wrote: > The commit summary is too generic. > How about: > rpc: getaddrinfo: also accept IPv4-mapped IPv6 addresses > > On a Monday in 2020, Zhimin Feng wrote: > > If only IPv6 is configured and nscd is started, getaddrinfo > > Is ncsd required

Re: [PATCH] rpc: 'getaddrinfo' function support both IPv4 and IPv6

2020-03-02 Thread Ján Tomko
The commit summary is too generic. How about: rpc: getaddrinfo: also accept IPv4-mapped IPv6 addresses On a Monday in 2020, Zhimin Feng wrote: If only IPv6 is configured and nscd is started, getaddrinfo Is ncsd required to reproduce this? Looking at glibc source: libvirt passes AI_ADDRCONFIG

[PATCH] rpc: 'getaddrinfo' function support both IPv4 and IPv6

2020-03-02 Thread Zhimin Feng
If only IPv6 is configured and nscd is started, getaddrinfo function reture value is -9. So hints.ai_flags should include the AI_V4MAPPED flag. The following is the partial implementation of getaddrinfo(glibc): if (req->ai_family == AF_UNSPEC || req->ai_family == AF_INET) at->family =