Re: [PATCH 1/2] BUG/MINOR: lua: Fix Server.get_addr() port values

2017-07-23 Thread Willy Tarreau
Hi Nenad, On Sun, Jul 23, 2017 at 10:04:58PM -0400, Nenad Merdanovic wrote: > The get_addr() method of the Lua Server class was using the > 'sockaddr_storage addr' member to get the port value. HAProxy does not > store ports in this member as it uses a separate member, called > 'svc_port'. Hmmm g

Re: Odd behaviour with option forwardfor.

2017-07-23 Thread Willy Tarreau
Hi Aleks, On Sun, Jul 23, 2017 at 09:50:41AM +0200, Aleksandar Lazic wrote: > > Personally I use 2 rules similar to the following to append to > > X-Forwarded-For: > > > >   http-request set-header X-Forwarded-For > > %[req.fhdr(X-Forwarded-For)],\ %[src] if { req.fhdr(X-Forwar

Re: Passing SNI value ( ssl_fc_sni ) to backend's verifyhost.

2017-07-23 Thread Willy Tarreau
Hi Kevin, On Fri, Jul 21, 2017 at 02:06:52PM -0700, Kevin McArthur wrote: > Further... the odd/broken behavior might be being caused related to no sni > indication on the health checks... > > This config sort of works: > > > *server app2 ssltest.example.ca:443 ssl verify required /verifyhost >

[PATCH 1/2] BUG/MINOR: lua: Fix Server.get_addr() port values

2017-07-23 Thread Nenad Merdanovic
The get_addr() method of the Lua Server class was using the 'sockaddr_storage addr' member to get the port value. HAProxy does not store ports in this member as it uses a separate member, called 'svc_port'. This fix should be backported to 1.7. --- src/hlua_fcn.c | 6 ++ 1 file changed, 2 ins

[PATCH 2/2] BUG/MINOR: lua: Correctly use INET6_ADDRSTRLEN in Server.get_addr()

2017-07-23 Thread Nenad Merdanovic
The get_addr() method of the Lua Server class incorrectly used INET_ADDRSTRLEN for IPv6 addresses resulting in failing to convert longer IPv6 addresses to strings. This fix should be backported to 1.7. --- src/hlua_fcn.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hlua

Re: Odd behaviour with option forwardfor.

2017-07-23 Thread Aleksandar Lazic
Hi Claus, Claus Strommer wrote on 23.07.2017: > Hi Aleks, > > Patrick's solution is correct.  What I was expecting was that HAProxy would > take > > X-Forwarded-For: 1.1.1.1 > > and produce > > X-Forwarded-For: 1.1.1.1,2.2.2.2 > > but what it actually does is produce > > X-Forwarded-For: 1.1.1.1

Re: Odd behaviour with option forwardfor.

2017-07-23 Thread Claus Strommer
Hi Aleks, Patrick's solution is correct. What I was expecting was that HAProxy would take X-Forwarded-For: 1.1.1.1 and produce X-Forwarded-For: 1.1.1.1,2.2.2.2 but what it actually does is produce X-Forwarded-For: 1.1.1.1 X-Forwarded-For: 2.2.2.2 The backend concatenates the lines and treat

Re: Odd behaviour with option forwardfor.

2017-07-23 Thread Aleksandar Lazic
Hi Patrick Hemmer, Patrick Hemmer wrote on 22.07.2017: > On 2017/7/22 11:11, Claus Strommer wrote: > > Hi all, I'm seeing some odd behaviour with our > haproxy balancer and am looking for some insights. > >The setup: > >

Re: AWS ELB as a backend

2017-07-23 Thread Aleksandar Lazic
Hi DHAVAL JAISWAL, DHAVAL JAISWAL wrote on 21.07.2017: > I have used ELB (public) as a front of Haproxy and ELB (internal) as a > backend for the apps server. > > so structure is like as follows. Currently using Haproxy 1.7. > However, request is not going to the backend server. > > ELB ->> HAP