[Openvpn-devel] [PATCH 3/4] Add gc_arena to struct argv to save allocations

2020-02-06 Thread David Sommerseth
From: Heiko Hund With the private gc_arena we do not have to allocate the strings found during parsing again, since we know the arena they are allocated in is valid as long as the argv vector is. Signed-off-by: Heiko Hund Signed-off-by: David Sommerseth --- src/openvpn/argv.c

[Openvpn-devel] [PATCH 4/4] Documented all the argv related code with minor refactoring

2020-02-06 Thread David Sommerseth
Added doxygen comments for all the functions in argv.c. There are some slight refactoring, renaming a few variables to make their use case more obvious and ensure lines do not break our 80-chars per line coding style limit. Signed-off-by: David Sommerseth --- src/openvpn/argv.c | 251 ++

[Openvpn-devel] [PATCH 2/4] argv: do fewer memory re-allocations

2020-02-06 Thread David Sommerseth
From: Heiko Hund Prevent the re-allocations of memory when the internal argv grows beyond 2 and 4 arguments by initially allocating argv to hold up to 7 (+ trailing NULL) pointers. While at it rename argv_reset to argv_free to actually express what's going on. Redo the argv_reset functionality s

[Openvpn-devel] [PATCH 0/4] struct argv overhaul - Feb 2020 edition

2020-02-06 Thread David Sommerseth
Hi, I've yet again rebased the last attempt of the struct argv overhaul patches [1] to the latest public git master [2]. This rebase just needed a few minor changes to account for changes with tls-crypt-v2 and sitnl patches now being included. I've also applied Arne's review comments [3]. To s

[Openvpn-devel] [PATCH 1/4] re-implement argv_printf_*()

2020-02-06 Thread David Sommerseth
From: Heiko Hund The previous implementation had the problem that it was not fully compatible with printf() and could only detect % format directives following a space character (0x20). It modifies the format string and inserts marks to separate groups before passing it to the regular printf in

Re: [Openvpn-devel] [PATCH 1/2] Skip DNS address validation

2020-02-06 Thread Domagoj Pensa
Hi! On Thu, Feb 06, 2020 at 09:58:37AM +, Simon Rozman wrote: > Hi, > > My thoughts exactly: as Lev pointed out: > https://github.com/rozmansi/openvpn/commit/6b746cb0bf72a75e9963cc1a037c18cfb > 856702a > > Acked-by: Simon Rozman > > Domagoj, if it's not too much for you, maybe document the

Re: [Openvpn-devel] [PATCH 1/2] Skip DNS address validation

2020-02-06 Thread Simon Rozman
Hi, My thoughts exactly: as Lev pointed out: https://github.com/rozmansi/openvpn/commit/6b746cb0bf72a75e9963cc1a037c18cfb 856702a Acked-by: Simon Rozman Domagoj, if it's not too much for you, maybe document the reason why DNS validation is so slow in the commit message. My wording went like thi