Re: [PATCH 0/8] Add IPv6 support to the ipmask converter

2018-01-21 Thread Jarno Huuskonen
Hi, On Sun, Jan 21, Tim Düsterhus wrote: > Jarno, > > Am 15.01.2018 um 14:28 schrieb Jarno Huuskonen: > > I'll try to test later (might be couple of days). > > Did you find time, yet? I did some brief testing on saturday and with this silly config frontend test4 bind

[PATCH] BUG/MEDIUM: standard: Fix memory leak in str2ip2()

2018-01-21 Thread Tim Duesterhus
Hi attached is a patch that fixes a memory leak in str2ip2. I wasn't sure about the severity of this bug (it's only 140 Bytes per call for me) and opted for MEDIUM. Change if you think MAJOR (?) is more warranted for a memory leak. Also I wasn't sure how I would structure the code best. I did

Re: [PATCH 0/8] Add IPv6 support to the ipmask converter

2018-01-21 Thread Tim Düsterhus
Jarno, Willy, Am 15.01.2018 um 14:28 schrieb Jarno Huuskonen: > On Sun, Jan 14, Tim Düsterhus wrote: >>> Have you tested that req.hdr_ip / stick tables work w/both masks ? I >>> used something like: >>> http-request track-sc0 req.hdr_ip(X,1),ipmask(24,64) table test_be >>> http-request

Re: Show: haproxy-auth-request - HTTP access control using subrequests

2018-01-21 Thread Ciprian Dorin Craciun
On Sun, Jan 21, 2018 at 4:17 PM, Tim Düsterhus wrote: >> Quick question though: does this script actually block HAproxy's >> event loop while waiting for the response from the backend server? > > haproxy's Socket class is documented to be non-blocking, as explained > here:

Re: Show: haproxy-auth-request - HTTP access control using subrequests

2018-01-21 Thread Tim Düsterhus
Ciprian, Am 21.01.2018 um 13:26 schrieb Ciprian Dorin Craciun: > Nice little tool! Thank you. > Quick question though: does this script actually block HAproxy's > event loop while waiting for the response from the backend server? > > (I've read quickly through your article describing the

Re: [PATCH 0/8] Add IPv6 support to the ipmask converter

2018-01-21 Thread Tim Düsterhus
Willy, Am 21.01.2018 um 14:07 schrieb Willy Tarreau: > There's no problem here because these ones are word-aligned anyway. > There are other such occurrences elsewhere in the code, so don't > worry for this one. Okay, I sent an updated patch that uses the cast to uint32_t. > From what I've seen

[PATCH v4 8/8] MEDIUM: sample: Add IPv6 support to the ipmask converter

2018-01-21 Thread Tim Duesterhus
Add an optional second parameter to the ipmask converter that specifies the number of bits to mask off IPv6 addresses. If the second parameter is not given IPv6 addresses fail to mask (resulting in an empty string), preserving backwards compatibility: Previously a sample like `src,ipmask(24)`

Re: [PATCH 0/8] Add IPv6 support to the ipmask converter

2018-01-21 Thread Willy Tarreau
Hi Tim, On Sun, Jan 21, 2018 at 01:24:06PM +0100, Tim Düsterhus wrote: > Jarno, > > Am 15.01.2018 um 14:28 schrieb Jarno Huuskonen: > > I'll try to test later (might be couple of days). > > Did you find time, yet? > > > I'll get a compilation error on centos7: > > src/sample.c: In function

Re: Show: haproxy-auth-request - HTTP access control using subrequests

2018-01-21 Thread Ciprian Dorin Craciun
On Fri, Jan 19, 2018 at 9:23 PM, Tim Düsterhus wrote: > https://github.com/TimWolla/haproxy-auth-request > > This Lua script reimplements the idea behind nginx' > ngx_http_auth_request_module in haproxy: It allows you to decide whether > an HTTP request should be allowed or not

Re: [PATCH 0/8] Add IPv6 support to the ipmask converter

2018-01-21 Thread Tim Düsterhus
Jarno, Am 15.01.2018 um 14:28 schrieb Jarno Huuskonen: > I'll try to test later (might be couple of days). Did you find time, yet? > I'll get a compilation error on centos7: > src/sample.c: In function ‘sample_conv_ipmask’: > src/sample.c:1623:3: error: ‘for’ loop initial declarations are only