Thank you very much for fixing this! Martin
-------- Original-Nachricht -------- > Datum: Tue, 22 Mar 2011 11:57:24 +0100 > Von: David du Colombier <[email protected]> > An: Martin Kofahl <[email protected]> > CC: [email protected] > Betreff: Re: loop in 1.5-dev4 ? > Hi, > > On Tue, 22 Mar 2011 07:36:17 +0100 > Willy Tarreau <[email protected]> wrote: > > > On Mon, Mar 21, 2011 at 12:52:23PM +0100, Martin Kofahl wrote: > > > With 1.4 the backend works fine, but with 1.5-dev4 haproxy connects > > > itself in stead of the backend. Can you please verify this behavior? > > > > Sounds like the server's address was resolved as 0.0.0.0 and that > > the system is connecting to itself :-( > > > > Could you please run that through strace and send the output. The > > only possible thing I see was that I broke something when merging > > the IPv6 work, maybe sometimes an address is not filled before a > > connect(). > > I can confirm this behavior. > > This bug was indeed caused by the recent IPv6 change. > > In backend.c, in function assign_server_address, if a server have no > address, this address is replaced by the address the client asked. > > Since the IPv6 introduction, I added a function is_addr which returns > 1 when an address is not empty. > > A mistake in this function caused the return value of IPv4 to be > inverted. Therefore the server address was incorrectly replaced > by the address requested by the client. > > In your case, you observed a loop because your server used the same > port as HAProxy. > > Please find attached the small patch which fix this problem. > > -- > David du Colombier

