Re: [ANNOUNCE] haproxy-2.2-dev12

2020-07-04 Thread William Dauchy
Hello Willy, On Sat, Jul 4, 2020 at 8:11 AM Willy Tarreau wrote: > HAProxy 2.2-dev12 was released on 2020/07/04. It added 72 new commits > after version 2.2-dev11. maybe the package is being uploaded but I can't find it on http://www.haproxy.org/download/2.2/src/devel/ > - for developers, bui

Re: [ANNOUNCE] haproxy-2.2-dev12

2020-07-04 Thread Tim Düsterhus
Willy, Am 04.07.20 um 08:10 schrieb Willy Tarreau: > Tim also had some post-2.2 fixes pending to improve free() calls and > remove some valgrind complaints on exit. > Good you mention it, because I forgot to give a heads up: The series grew a little bit further. My 'deinit' branch as of now is 1

Re: [ANNOUNCE] haproxy-2.2-dev12

2020-07-04 Thread Willy Tarreau
Hi Tim, On Sat, Jul 04, 2020 at 10:58:12AM +0200, Tim Düsterhus wrote: > Willy, > > Am 04.07.20 um 08:10 schrieb Willy Tarreau: > > Tim also had some post-2.2 fixes pending to improve free() calls and > > remove some valgrind complaints on exit. > > > > Good you mention it, because I forgot to

Re: [ANNOUNCE] haproxy-2.2-dev12

2020-07-04 Thread Willy Tarreau
On Sat, Jul 04, 2020 at 10:17:50AM +0200, William Dauchy wrote: > Hello Willy, > > On Sat, Jul 4, 2020 at 8:11 AM Willy Tarreau wrote: > > HAProxy 2.2-dev12 was released on 2020/07/04. It added 72 new commits > > after version 2.2-dev11. > > maybe the package is being uploaded but I can't find i

[PATCH v2 01/15] BUG/MINOR: acl: Fix freeing of expr->smp in prune_acl_expr

2020-07-04 Thread Tim Duesterhus
Instead of simply calling free() in expr->smp->arg_p in certain cases properly free the sample using release_sample_expr(). Given the following example configuration: frontend foo bind *:8080 mode http http-request set-var(txn.foo) str(bar) acl is_match str(foo

[PATCH v2 06/15] BUG/MINOR: haproxy: Free srule->file during deinit

2020-07-04 Thread Tim Duesterhus
Given the following example configuration: backend foo mode http use-server x if { always_true } server x example.com:80 Running a configuration check with valgrind reports: ==18650== 14 bytes in 1 blocks are definitely lost in loss record 3 of 345 ==18650==

[PATCH v2 07/15] BUG/MINOR: haproxy: Free srule->expr during deinit

2020-07-04 Thread Tim Duesterhus
Given the following example configuration: backend foo mode http use-server %[str(x)] if { always_true } server x example.com:80 Running a configuration check with valgrind reports: ==19376== 170 (40 direct, 130 indirect) bytes in 1 blocks are definitely lost in

[PATCH v2 10/15] CLEANUP: haproxy: Free proxy_deinit_list in deinit()

2020-07-04 Thread Tim Duesterhus
This allocation is technically always reachable and cannot leak, but so are a few others that *are* freed. --- src/haproxy.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/haproxy.c b/src/haproxy.c index 53301c0be..64d7e0eea 100644 --- a/src/haproxy.c +++ b/src/hapro

[PATCH v2 05/15] BUG/MINOR: haproxy: Free proxy->unique_id_header during deinit

2020-07-04 Thread Tim Duesterhus
Given the following example configuration: frontend foo mode http bind *:8080 unique-id-header x Running a configuration check with valgrind reports: ==17621== 2 bytes in 1 blocks are definitely lost in loss record 1 of 341 ==17621==at 0x4C2DB8F: malloc (i

[PATCH v2 13/15] CLEANUP: haproxy: Free post_server_check_list in deinit()

2020-07-04 Thread Tim Duesterhus
This allocation is technically always reachable and cannot leak, but so are a few others that *are* freed. --- src/haproxy.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/src/haproxy.c b/src/haproxy.c index 7f05d39a8..489a0ebe8 100644 --- a/src/haproxy.c +++ b/src/haproxy.c @@ -2606,6

[PATCH v2 12/15] CLEANUP: haproxy: Free server_deinit_list in deinit()

2020-07-04 Thread Tim Duesterhus
This allocation is technically always reachable and cannot leak, but so are a few others that *are* freed. --- src/haproxy.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/haproxy.c b/src/haproxy.c index 70d442c40..7f05d39a8 100644 --- a/src/haproxy.c +++ b/src/hapro

[PATCH v2 04/15] BUG/MINOR: haproxy: Add missing free of server->(hostname|resolvers_id)

2020-07-04 Thread Tim Duesterhus
Given the following example configuration: resolvers test nameserver test 127.0.0.1:53 listen foo bind *:8080 server foo example.com resolvers test Running a configuration check within valgrind reports: ==21995== 5 bytes in 1 blocks are definitely lost in loss

[PATCH v2 09/15] BUG/MINOR: sample: Free str.area in smp_check_const_meth

2020-07-04 Thread Tim Duesterhus
Given the following example configuration: listen foo mode http bind *:8080 http-request set-var(txn.leak) meth(GET) server x example.com:80 Running a configuration check with valgrind reports: ==25992== 4 bytes in 1 blocks are definitely lost in loss reco

[PATCH v2 02/15] BUG/MINOR: sample: Fix freeing of conv_exprs in release_sample_expr

2020-07-04 Thread Tim Duesterhus
Instead of just calling release_sample_arg(conv_expr->arg_p) we also must free() the conv_expr itself (after removing it from the list). Given the following example configuration: frontend foo bind *:8080 mode http http-request set-var(txn.foo) str(bar) acl is_

[PATCH v2 11/15] CLEANUP: haproxy: Free post_deinit_list in deinit()

2020-07-04 Thread Tim Duesterhus
This allocation is technically always reachable and cannot leak, but so are a few others that *are* freed. --- src/haproxy.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/haproxy.c b/src/haproxy.c index 64d7e0eea..70d442c40 100644 --- a/src/haproxy.c +++ b/src/hapro

[PATCH v2 03/15] BUG/MINOR: haproxy: Free proxy->format_unique_id during deinit

2020-07-04 Thread Tim Duesterhus
Given the following example configuration: frontend foo mode http bind *:8080 unique-id-format x Running a configuration check with valgrind reports: ==30712== 42 (40 direct, 2 indirect) bytes in 1 blocks are definitely lost in loss record 18 of 39 ==30712==

[PATCH v2 00/15] deinit / free stuff

2020-07-04 Thread Tim Duesterhus
Willy, Am 04.07.20 um 11:13 schrieb Willy Tarreau: >> Or you tell me to send it now and apply it to 'next'. > > It's up to you. I personally like to keep my topic branch till the last > moment because that leaves more more freedom to revisit my patches later, > but when I'm certain patches are de

[PATCH v2 08/15] BUG/MINOR: sample: Free str.area in smp_check_const_bool

2020-07-04 Thread Tim Duesterhus
Given the following example configuration: listen foo mode http bind *:8080 http-request set-var(txn.leak) bool(1) server x example.com:80 Running a configuration check with valgrind reports: ==24233== 2 bytes in 1 blocks are definitely lost in loss record

[PATCH v2 14/15] CLEANUP: Add static void vars_deinit()

2020-07-04 Thread Tim Duesterhus
vars_deinit() frees all var_names during deinit(). --- src/vars.c | 9 + 1 file changed, 9 insertions(+) diff --git a/src/vars.c b/src/vars.c index fd95eed5d..c69a561fa 100644 --- a/src/vars.c +++ b/src/vars.c @@ -857,6 +857,15 @@ static int vars_max_size_check(char **args, int section_t

[PATCH v2 15/15] CLEANUP: Add static void hlua_deinit()

2020-07-04 Thread Tim Duesterhus
Compiling HAProxy with USE_LUA=1 and running a configuration check within valgrind with a very simple configuration such as: listen foo bind *:8080 Will report quite a few possible leaks afterwards: ==24048== LEAK SUMMARY: ==24048==definitely lost: 0 bytes in 0 blocks

Re: [ANNOUNCE] haproxy-2.2-dev12

2020-07-04 Thread Tim Düsterhus
Willy, Am 04.07.20 um 11:13 schrieb Willy Tarreau: >> Or you tell me to send it now and apply it to 'next'. > > It's up to you. I personally like to keep my topic branch till the last > moment because that leaves more more freedom to revisit my patches later, > but when I'm certain patches are de

Re: [ANNOUNCE] haproxy-2.2-dev12

2020-07-04 Thread Willy Tarreau
On Sat, Jul 04, 2020 at 11:57:08AM +0200, Tim Düsterhus wrote: > > It's up to you. I personally like to keep my topic branch till the last > > moment because that leaves more more freedom to revisit my patches later, > > but when I'm certain patches are definitive, I prefer to get them merged > > a

Re: [ANNOUNCE] haproxy-2.2-dev12

2020-07-04 Thread Tim Düsterhus
Willy, Am 04.07.20 um 12:11 schrieb Willy Tarreau: > Thank you. I now rebased next and applied your series on top of it. I'm > not going to review what goes into -next, or it defeats the purpose of > using it as a pending queue. There's enough time so that anyone can > suggest a change and even if

Re: [ANNOUNCE] haproxy-2.2-dev12

2020-07-04 Thread Willy Tarreau
On Sat, Jul 04, 2020 at 02:42:53PM +0200, Tim Düsterhus wrote: > Willy, > > Am 04.07.20 um 12:11 schrieb Willy Tarreau: > > Thank you. I now rebased next and applied your series on top of it. I'm > > not going to review what goes into -next, or it defeats the purpose of > > using it as a pending q

[PATCH 1/2] MEDIUM: ssl: Support certificate chaining for certificate generation

2020-07-04 Thread gersner
From: Shimi Gersner haproxy supports generating SSL certificates based on SNI using a provided CA signing certificate. Because CA certificates may be signed by multiple CAs, in some scenarios, it is neccesary for the server to attach the trust chain in addition to the generated certificate. The

[PATCH 0/2] Certificate Generation Enhancements

2020-07-04 Thread gersner
From: Shimi Gersner Hi folks, The following patches add two enhancements to the certificate generation feature. - SAN extension on the generated certificate - Chaining the full trust of the original CA certificate While evaluating HAP for a new product we realized that these two features ar

[PATCH 2/2] SMALL: ssl: Support SAN extension for certificate generation

2020-07-04 Thread gersner
From: Shimi Gersner The use of Common Name is fading out in favor of the RFC recommended way of using SAN extensions. For example, Chrome from version 58 will only match server name against SAN. The following patch adds an optional flag to attach SAN extension of type DNS to the generated certif