Re: haproxy works OK with cttproxy + ipv6!

From: Willy Tarreau <w#1wt.eu>
Date: Mon, 20 Jun 2011 10:08:15 +0200


Hi,

On Mon, Jun 20, 2011 at 03:37:28PM +0800, Delta Yeh wrote:
> Hi ,
> The top is
> Client(v6)----- (v6)haproxy(v6)----(v6)WWW
>
> Main config(ip6tables,ebtables,route) is almost the same as what we
> do with ipv4 .

Cool, thanks for the feedback.

> Some differenct is :
> 1. I use 2.6.39 kernel, and make USE_LINUX_TPROXY=1
> USE_GETADDRINFO=1 USE_STATIC_PCRE=1 to build haproxy.
> 2. I appled the patch which allow bind nonlocal address with ipv6
> 3. I made a little change to haproxy(seems a bug?), the patch is attached.
>

I don't see why this patch should be necessary, the same line is already present 10 lines above in the "if (flags)" block. Are you sure you were not just experimentating with it when trying to solve the issue below ?

> But there is still some problem:
> 1. Client(v4)----- (v4)haproxy(v6)----(v6)WWW
> Does not work if I extract client from HTTP headers.

This should be looked at, it is possible that we forget to correctly set the address family, or maybe that we're not parsing the IPv6 address from the x-forwarded-for header. Hmmm that's very likely indeed, from what I recall of this code!

> 2. ipv6 address parser in haproxy need to be improved, for example
> source directive.

Yes, I believe we have other pending patches for this. We should make a new pass on all of that, but still there are some functions which rely on an address to fit into a 32-bit word and those should be addressed first.

Regards,
Willy Received on 2011/06/20 10:08

This archive was generated by hypermail 2.2.0 : 2011/06/20 10:15 CEST