On 12/05/14 21:15, Michal Kubecek wrote: > On Fri, Dec 05, 2014 at 06:51:47PM +0100, [email protected] wrote: >> As Jaybird is not using the client library, that assumption might not be >> correct. I'll look into that more closely tomorrow. > I checked the code and I think I see where the problem comes from: > aux_request() sets packet->p_resp to what getsockname() returns for the > main connection socket. In case of an IPv4 connection to a PF_INET6 > listening socket, that would be a v6-mapped address. If the client > expects only struct sockaddr_in and doesn't check sa_family, it will > read wrong address. > > While the clients should eventually learn to expect and process IPv6 > addresses, this should be fixed to preserve backwards compatibility by > calling unmapV4() on the address first so that an v6-mapped address is > converted to normal IPv4 one. > > The reason I didn't notice this when testing the events was that 2.5 > libfbclient also ignores the address passed by server so that it didn't > matter that it was wrong. > > I'll commit a fix once I have it tested.
I think that for protocol 13 this step may be just omitted and all clients should never get IP address from server (i.e. behave like fbclient does long ago). For previous protocols to provide compatibility v4 address should be used. ------------------------------------------------------------------------------ Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server from Actuate! Instantly Supercharge Your Business Reports and Dashboards with Interactivity, Sharing, Native Excel Exports, App Integration & more Get technology previously reserved for billion-dollar corporations, FREE http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
