Re: [PATCH] MEDIUM: proxy_protocol: Send IPv4 addresses when possible

2018-07-20 Thread Lukas Tribus
Hello, On Wed, 18 Jul 2018 at 14:30, Willy Tarreau wrote: > > Hi Tim, > > On Wed, Jul 18, 2018 at 01:48:01PM +0200, Tim Düsterhus wrote: > > This would solve the issue for my use case and should not break anything > > (a few UNKNOWNs will become TCP6 then). > > OK. > > > I can rework the patch,

Re: [PATCH] MEDIUM: proxy_protocol: Send IPv4 addresses when possible

2018-07-18 Thread Tim Düsterhus
Willy, Am 18.07.2018 um 14:30 schrieb Willy Tarreau: >> I can rework the patch, if technical changes look good to you. There's a >> ton of memcpy in there to not destroy the data structures needed for the >> actual communication: make_proxy_line() now always operates on a copy of >> `struct

Re: [PATCH] MEDIUM: proxy_protocol: Send IPv4 addresses when possible

2018-07-18 Thread Willy Tarreau
Hi Tim, On Wed, Jul 18, 2018 at 01:48:01PM +0200, Tim Düsterhus wrote: > This would solve the issue for my use case and should not break anything > (a few UNKNOWNs will become TCP6 then). OK. > I can rework the patch, if technical changes look good to you. There's a > ton of memcpy in there to

Re: [PATCH] MEDIUM: proxy_protocol: Send IPv4 addresses when possible

2018-07-18 Thread Tim Düsterhus
Willy, Am 18.07.2018 um 04:25 schrieb Willy Tarreau: > What I would suggest would be to only "upgrade" the addresses to IPv6 > if either side already is on IPv6, but never downgrade from IPv6 to > IPv4 since v6-mapped v4 addresses can exist on both sides for a valid > reason. > This would solve

Re: [PATCH] MEDIUM: proxy_protocol: Send IPv4 addresses when possible

2018-07-17 Thread Willy Tarreau
Hi! On Tue, Jul 17, 2018 at 01:39:38PM +0200, Lukas Tribus wrote: > Hello Tim, > > > On Fri, 29 Jun 2018 at 21:00, Tim Duesterhus wrote: > > > > This patch changes the sending side of proxy protocol to convert IP > > addresses to IPv4 when possible (and converts them IPv6 otherwise). > > > >

Re: [PATCH] MEDIUM: proxy_protocol: Send IPv4 addresses when possible

2018-07-17 Thread Lukas Tribus
Hello Tim, On Fri, 29 Jun 2018 at 21:00, Tim Duesterhus wrote: > > This patch changes the sending side of proxy protocol to convert IP > addresses to IPv4 when possible (and converts them IPv6 otherwise). > > Previously the code failed to properly provide information under > certain

Re: [PATCH] MEDIUM: proxy_protocol: Send IPv4 addresses when possible

2018-07-17 Thread Tim Düsterhus
Willy, Am 29.06.2018 um 20:59 schrieb Tim Duesterhus: > This patch changes the sending side of proxy protocol to convert IP > addresses to IPv4 when possible (and converts them IPv6 otherwise). > > Previously the code failed to properly provide information under > certain circumstances: > > 1.

[PATCH] MEDIUM: proxy_protocol: Send IPv4 addresses when possible

2018-06-29 Thread Tim Duesterhus
This patch changes the sending side of proxy protocol to convert IP addresses to IPv4 when possible (and converts them IPv6 otherwise). Previously the code failed to properly provide information under certain circumstances: 1. haproxy is being accessed using IPv4, http-request set-src sets a