[Openvpn-devel] [PATCH] win32 build: check for ENETUNREACH

2017-07-09 Thread Ilya Shipitsin
Currently, we do not check for mingw-gcc version. For example, Debian 7 is shipped with 4.6.3, which does not know about ENETUNREACH --- this is for 2.4 and HEAD branches configure.ac | 14 ++ 1 file changed, 14 insertions(+) diff --git a/configure.ac b/configure.ac index 60bb465..8

Re: [Openvpn-devel] [PATCH v2 3/3] Replace deprecated LZ4 function

2017-07-09 Thread Antonio Quartulli
Hi, On 22/02/17 03:27, David Sommerseth wrote: > +#if defined LZ4_VERSION_NUMBER && LZ4_VERSION_NUMBER >= 10700 > +zlen = LZ4_compress_default((const char *)BPTR(buf), (char > *)BPTR(work), BLEN(buf), zlen_max ); > +#else > zlen = LZ4_compress_limitedOutput((const char *)BPTR(buf

[Openvpn-devel] [PATCH 4/4] ntlm: improve code style and readability

2017-07-09 Thread Antonio Quartulli
This patch does not introduce any functional or behavioural change. The code in ntlm.c has been restyled to better to obey to the new coding style and its readability has been a improved a bit. Signed-off-by: Antonio Quartulli --- src/openvpn/ntlm.c | 74 +---

[Openvpn-devel] [PATCH 0/4] ntlm: remove warnings and improve code style

2017-07-09 Thread Antonio Quartulli
This small patcheset is aimed to simply remove some unnecessary warnings and improve the readability of ntlm.c. Compile tests have been performed with "-Wall -std=c99". This is another step towards having a clean build when using -Wall. Cheers, Antonio Quartulli (4): ntlm: convert binary buf

[Openvpn-devel] [PATCH 3/4] ntlm: restyle compressed multiple function calls

2017-07-09 Thread Antonio Quartulli
The gen_md4_hash() function is receiving as first argument a buffer that is filled by a function invoked when evaluating the second argument. Although this is proper C, it makes the call invocation a bit obscure because it is not immediately easy to grasp how the 'pwbuf' buffer is filled. Unroll

[Openvpn-devel] [PATCH 2/4] ntlm: avoid useless cast

2017-07-09 Thread Antonio Quartulli
The argument passed to my_strupr() is converted to an upper case string by means of toupper(). The latter expects a single signed int as argument, therefore it makes sense to have my_strupr() take a signed argument too and avoid an explicit and an implicit cast. Signed-off-by: Antonio Quartulli -

[Openvpn-devel] [PATCH 1/4] ntlm: convert binary buffers to uint8_t *

2017-07-09 Thread Antonio Quartulli
several binary buffers in the ntml component are stored as char *, however this generates a lot of warnings, because hashing functions expect something unsigned. Convert binary buffers to uint8_t *, while use explicit cast for buffers that are really carrying a string inside. This commit removes

Re: [Openvpn-devel] [PATCH v2 3/3] Replace deprecated LZ4 function

2017-07-09 Thread Gert Doering
Hi, On Mon, Jul 10, 2017 at 12:31:31PM +0800, Antonio Quartulli wrote: > Instead of cluttering the code with these ifdefs directly in the main > codebase, how about doing it in compat.h, like this (it's a copy/paste - > code might be wrapper by the mail client): Better, but I wonder if we shouldn

Re: [Openvpn-devel] [PATCH v2 3/3] Replace deprecated LZ4 function

2017-07-09 Thread Antonio Quartulli
Hi, On 10/07/17 14:30, Gert Doering wrote: > Hi, > > On Mon, Jul 10, 2017 at 12:31:31PM +0800, Antonio Quartulli wrote: >> Instead of cluttering the code with these ifdefs directly in the main >> codebase, how about doing it in compat.h, like this (it's a copy/paste - >> code might be wrapper by