[Openvpn-devel] [PATCH] attempt to add IPv6 route even when no IPv6 address was configured

2017-01-31 Thread Antonio Quartulli
of the possible pitfall. Always allow adding an IPv6 route and print a WARNING when no IPv6 address is configured for the interface. Trac: #832 Signed-off-by: Antonio Quartulli <a...@unstable.cc> --- src/openvpn/route.c | 17 + 1 file changed, 9 insertions(+), 8 deletions(-)

Re: [Openvpn-devel] [PATCH] reload HTTP proxy credentials when moving to the next connection profile

2017-01-31 Thread Antonio Quartulli
Hi Selva, thank you very much for your feedback! On Tue, Jan 31, 2017 at 03:02:33PM -0500, Selva Nair wrote: > Hi, > > On Tue, Jan 31, 2017 at 1:22 PM, Antonio Quartulli <a...@unstable.cc> wrote: > > > iff --git a/src/openvpn/proxy.c b/src/openvpn/proxy.c > > i

Re: [Openvpn-devel] [PATCH] reload HTTP proxy credentials when moving to the next connection profile

2017-02-01 Thread Antonio Quartulli
Hi, On Wed, Feb 01, 2017 at 11:04:55AM +0800, Antonio Quartulli wrote: > > That said, there is one issue with this approach. Looks like SIGUSR1 > > restarts will now always prompt for proxy password, which is not proper. > > Right! Thanks for pointing this out! Actually I'd

[Openvpn-devel] [PATCH] reload HTTP proxy credentials when moving to the next connection profile

2017-01-31 Thread Antonio Quartulli
rac: #836 Signed-off-by: Antonio Quartulli <a...@unstable.cc> --- src/openvpn/proxy.c | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/openvpn/proxy.c b/src/openvpn/proxy.c index b0ed3279..27f34bed 100644 --- a/src/openvpn/proxy.c +++ b/src/openvpn

Re: [Openvpn-devel] [PATCH] Fix building with LibreSSL 2.5.1 by cleaning a hack.

2017-02-06 Thread Antonio Quartulli
ATAL, "SSL_new failed"); > +} > +pkey = SSL_get_privatekey(ssl); > +SSL_free(ssl); I have a question (sorry if I couldn't check myself): did you check that SSL_get_privatekey

Re: [Openvpn-devel] [PATCH] Make auth-nocache cooperate with auth-token

2017-02-08 Thread Antonio Quartulli
token the username will be cached. Can this be a security concern? Maybe not because the username is already cached in the terminal? (Somebody had to type it) Cheers, -- Antonio Quartulli signature.asc Description:

Re: [Openvpn-devel] [PATCH] Make auth-nocache cooperate with auth-token

2017-02-08 Thread Antonio Quartulli
On Wed, Feb 08, 2017 at 11:58:32PM -0500, Selva Nair wrote: > Hi, > > On Wed, Feb 8, 2017 at 10:01 PM, Antonio Quartulli <a...@unstable.cc> wrote: > > > On Wed, Feb 08, 2017 at 02:25:44PM -0500, selva.n...@gmail.com wrote: > > > From: Selva Nair <selv

Re: [Openvpn-devel] [PATCH] add PR template in order to simplify new developers cooperate properly if they open PR. discussed here: https://sourceforge.net/p/openvpn/mailman/message/35601310/

2017-02-02 Thread Antonio Quartulli
y to send patches (with just one command) is probably useful: avoid several iterations when people try to send their patches with gmail and similar .. Cheers, -- Antonio Quartulli signature.asc Description: Digital signature ---

Re: [Openvpn-devel] [PATCH v5] convert *_inline attributes to bool

2017-01-22 Thread Antonio Quartulli
On Sun, Jan 22, 2017 at 05:31:56PM +0100, Steffan Karger wrote: > Hi, > > One more real comment and two nitpicks: > > On 15-01-17 15:43, Antonio Quartulli wrote: > > @@ -3233,39 +3258,63 @@ options_postprocess_filechecks(struct options > > *options) >

[Openvpn-devel] [PATCH] fix "redirect-gateway autolocal" behaviour when no def route exists

2017-01-21 Thread Antonio Quartulli
(applied to linux and android only). The aforementioned check has been implemented by generalizing and re-using the code in get_default_gateway_ipv6(). Signed-off-by: Antonio Quartulli <a...@unstable.cc> --- This patch has been tested on linux only. If I am not wrong,

[Openvpn-devel] [PATCH] ignore remote-random-hostname if a numeric host is provided

2017-01-30 Thread Antonio Quartulli
the randomization and directly using the numeric IP. Signed-off-by: Antonio Quartulli <a...@unstable.cc> --- src/openvpn/socket.c | 32 ++-- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/src/openvpn/socket.c b/src/openvpn/socket.c index 82d0967d..58db96da

Re: [Openvpn-devel] [PATCH] Resolve several travis-ci issues

2017-01-29 Thread Antonio Quartulli
ners think about this, but I stumbled on the wrong version a couple of times today before realizing that the newer was another one. Git can do this for you by specifying "-v X" (i.e. -v 2" to the git format-patch command. Cheers! -- Antonio Quartulli signature.asc Descr

Re: [Openvpn-devel] [PATCH] Fix building with LibreSSL 2.5.1 by cleaning a hack. Similar to what is done in curl: https://github.com/curl/curl/blob/028391df5d84d9fae3433afdee9261d565900355/lib/vtls/op

2017-02-15 Thread Antonio Quartulli
line. You need to put an empty line between the subject and the body. For example: my commit message this is the body and can be multiline random text here... and here... Cheers, -- Antonio Quartulli -- Check out th

Re: [Openvpn-devel] [PATCH] Fix segfault when using crypto lib without AES-256-CTR or SHA256

2017-02-22 Thread Antonio Quartulli
e applied as is. Then ... in theory, you can't take ownership of somebody else' work, but nothing prevents you from re-writing a "very similar" patch and sign it yourself. In particular if the author did not show any interest in pursuing this any further. my 2 cents. Cheers, -- Antonio Qua

Re: [Openvpn-devel] [PATCH] Fix segfault when using crypto lib without AES-256-CTR or SHA256

2017-02-22 Thread Antonio Quartulli
efer > > to the trac ticket in the commit msg)? Apply anyway? ...? > > > > if there are trac templates (I'm not very familiar with trac internals), we > can turn on the requirement of > > 1) full name > 2) legacy agreements > > on the trac side personally I think that

[Openvpn-devel] [PATCH] Ignore auth-nocache for auth-user-pass if auth-token is pushed

2017-02-24 Thread Antonio Quartulli
Sommerseth <open...@sf.lists.topphemmelig.net> Signed-off-by: Antonio Quartulli <a...@unstable.cc> --- src/openvpn/init.c | 12 src/openvpn/misc.c | 7 ++- src/openvpn/misc.h | 2 ++ src/openvpn/ssl.c | 33 - src/openvpn/ssl.h | 2

Re: [Openvpn-devel] [PATCH] cleanup: Remove faulty env processing functions

2017-02-25 Thread Antonio Quartulli
better to have this kind of code surrounded by some "#ifdef DEBUG" that can be enabled upon configuration ? Cheers, -- Antonio Quartulli signature.asc Description: Digital signature

Re: [Openvpn-devel] [PATCH] Make auth-nocache cooperate with auth-token

2017-02-08 Thread Antonio Quartulli
On Thu, Feb 09, 2017 at 12:47:16AM -0500, Selva Nair wrote: > Hi, > > On Thu, Feb 9, 2017 at 12:10 AM, Antonio Quartulli <a...@unstable.cc> wrote: > > > > > > I would consider username as not sensitive material although not sure > > > everyone would ag

Re: [Openvpn-devel] [PATCH] ifconfig-ipv6(-push): allow using hostnames

2017-02-10 Thread Antonio Quartulli
On Fri, Feb 10, 2017 at 10:36:07PM +0800, Antonio Quartulli wrote: > diff --git a/src/openvpn/socket.c b/src/openvpn/socket.c > index 82d0967d..55ff7737 100644 > --- a/src/openvpn/socket.c > +++ b/src/openvpn/socket.c > @@ -75,12 +75,102 @@ sf2gaf(const unsigned in

[Openvpn-devel] [PATCH] Allow learning iroutes with network made up of all 0s (only if netbits < 8)

2017-02-14 Thread Antonio Quartulli
networks. While at it, make the sanity check louder so that it can print the reason why a route is being rejected. Trac: #726 Signed-off-by: Antonio Quartulli <a...@unstable.cc> --- src/openvpn/mroute.c | 37 +++-- src/openvpn/mroute.h | 3 ++- src/openvpn/multi.c

[Openvpn-devel] [PATCH] ifconfig-ipv6(-push): allow using hostnames

2017-02-10 Thread Antonio Quartulli
already have with ifconfig(-push). The generic code introduced in this patch will be later used to implement the /bits parsing support for IPv4 addresses. Trac: #808 Signed-off-by: Antonio Quartulli <a...@unstable.cc> --- src/openvpn/options.c | 61 src/openvpn/opt

[Openvpn-devel] [PATCH] fix redirect-gateway behaviour when "local" is specified

2017-01-19 Thread Antonio Quartulli
). Therefore, avoid the unsolicited abort by skipping the default GW check when "local" is specified. Signed-off-by: Antonio Quartulli <a...@unstable.cc> --- This patch addresses the "*Flag as bug*" concern raised by Gert. Tested by connecting to a VPN server in the same

[Openvpn-devel] [PATCH v4] convert *_inline attributes to bool

2017-01-15 Thread Antonio Quartulli
Carrying around the INLINE_TAG is not really efficient, because it requires a strcmp() to be performed every time we want to understand if the data is stored inline or not. Convert all the *_inline attributes to bool to make the logic easier and checks more efficient. Signed-off-by: Antonio

[Openvpn-devel] [PATCH v2] fix redirect-gateway behaviour when an IPv4 default route does not exist

2017-01-19 Thread Antonio Quartulli
of the default route as it is not required at all. Therefore, skip the IPv4 default route check when "local" is specified or we are connecting to an IPv6 remote host. Signed-off-by: Antonio Quartulli <a...@unstable.cc> --- Actually, the fix required to consider the IPv6 case was not as b

[Openvpn-devel] [PATCH 2/3] mbedtls: implement crl-persist related functions

2016-10-19 Thread Antonio Quartulli
upon client connection was around 4-6 seconds. With this patch the delay gets close to 0. Signed-off-by: Antonio Quartulli <a...@unstable.cc> --- src/openvpn/ssl_verify_mbedtls.c | 102 +++ 1 file changed, 83 insertions(+), 19 deletions(-) diff --git a/src/o

[Openvpn-devel] [PATCH 0/3] implement crl-persist logic

2016-10-19 Thread Antonio Quartulli
imilar.. Comments are welcome! Cheers, Antonio Quartulli (3): openvpn: implement crl-persist logic mbedtls: implement crl-persist related functions openssl: implement crl-persist related functions src/openvpn/init.c | 7 ++ src/openvpn/openvpn.h| 6 ++

[Openvpn-devel] [PATCH 1/3] openvpn: implement crl-persist logic

2016-10-19 Thread Antonio Quartulli
be implemented later. Note: inline or dir CRL is not supported when crl-persist is specified. Signed-off-by: Antonio Quartulli <a...@unstable.cc> --- src/openvpn/init.c | 7 +++ src/openvpn/openvpn.h| 6 ++ src/openvpn/options.c

[Openvpn-devel] [PATCH] reload CRL only if file was modified

2016-11-28 Thread Antonio Quartulli
several seconds to few milliseconds). Cc: Steffan Karger <steffan.kar...@fox-it.com> Signed-off-by: Antonio Quartulli <a...@unstable.cc> --- Tested on linux by using my VM. No test was performed on Windows* (compiled-only). Note: the check "!(session->opt->ssl_flags &

[Openvpn-devel] [PATCH] don't mix settings when crl-verify option appears more than once

2016-10-26 Thread Antonio Quartulli
clr-verify can be specified multiple times in the config file and the expected behaviour is that the last occurrence should be used. Therefore, reset the optional flags everytime a new crl-verify option is found. Signed-off-by: Antonio Quartulli <a...@unstable.cc> --- src/openvpn/options

Re: [Openvpn-devel] [PATCH] don't mix settings when crl-verify option appears more than once

2016-10-26 Thread Antonio Quartulli
On Wed, Oct 26, 2016 at 02:29:19PM +0200, Steffan Karger wrote: > Hi, > > On 26-10-16 14:06, Antonio Quartulli wrote: > > clr-verify can be specified multiple times in the config file and the > > expected behaviour is that the last occurrence should be used. > > > &

Re: [Openvpn-devel] [PATCH] don't mix settings when crl-verify option appears more than once

2016-10-26 Thread Antonio Quartulli
On Wed, Oct 26, 2016 at 03:30:39PM +0200, Arne Schwabe wrote: > > > Am 26.10.16 um 14:48 schrieb Steffan Karger: > > On 26-10-16 14:40, Antonio Quartulli wrote: > >> I was planning to do the rest of the refactoring in a second patch. > >> > >> At this p

Re: [Openvpn-devel] [PATCH v2] convert *_inline attributes to bool

2017-01-12 Thread Antonio Quartulli
On Wed, Jan 11, 2017 at 02:32:37PM +0800, Antonio Quartulli wrote: > On Tue, Jan 10, 2017 at 10:35:10PM +0100, Steffan Karger wrote: > > > @@ -6496,7 +6531,7 @@ add_option(struct options *options, > > > else if (streq(p[0], &q

[Openvpn-devel] [PATCH v5] convert *_inline attributes to bool

2017-01-15 Thread Antonio Quartulli
Carrying around the INLINE_TAG is not really efficient, because it requires a strcmp() to be performed every time we want to understand if the data is stored inline or not. Convert all the *_inline attributes to bool to make the logic easier and checks more efficient. Signed-off-by: Antonio

Re: [Openvpn-devel] [PATCH v3] convert *_inline attributes to bool

2017-01-15 Thread Antonio Quartulli
_inline, > > >gc); > > +add_option(options, p, is_inline, prefix, line_num, 0, > > msglevel, > > + permission_mask, option_types_found, es); > > } > > CLEAR(p); > > } > > Same as above, m

[Openvpn-devel] [PATCH v3] convert *_inline attributes to bool

2017-01-14 Thread Antonio Quartulli
Carrying around the INLINE_TAG is not really efficient, because it requires a strcmp() to be performed every time we want to understand if the data is stored inline or not. Convert all the *_inline attributes to bool to make the logic easier and checks more efficient. Signed-off-by: Antonio

Re: [Openvpn-devel] [PATCH v2] convert *_inline attributes to bool

2017-01-10 Thread Antonio Quartulli
ypto_msg(M_WARN, > > "Cannot load CA certificate file %s > > (entry %d did not validate)", > > - np(ca_file), added); > > + > > + print_if_inline(ca_file, >

[Openvpn-devel] #636: IPv6 subnets support in PF component

2016-12-03 Thread Antonio Quartulli
it any other multicast traffic, unless explicitly allowed by the user. If you guys also think this is the way to go, does anybody know how to translate this "make NDP work" into a whitelist rule? "+ff00::/8" is too broad. Cheers, -- Antonio Quartu

Re: [Openvpn-devel] [PATCH] reload CRL only if file was modified

2016-11-29 Thread Antonio Quartulli
_mtime) > { > ssl_ctx->crl_last_mtime.tv_sec = crl_stat.st_mtime; > backend_tls_ctx_reload_crl (ssl_ctx, crl_file, crl_file_inline); > } > > I slightly prefer this over adding the extra argument, but can l

Re: [Openvpn-devel] #636: IPv6 subnets support in PF component

2016-12-04 Thread Antonio Quartulli
ietf.org/rfc/rfc4890.txt [1] https://github.com/ordex/openvpn/tree/ipv6pf On Sun, Dec 04, 2016 at 12:51:43PM +0800, Antonio Quartulli wrote: > Dear all, > > as a "learning exercise" I started working on #636 over the weekend in the > attempt of digging deeper into the openvpn

[Openvpn-devel] [PATCH v2] reload CRL only if file was modified

2016-11-30 Thread Antonio Quartulli
several seconds to few milliseconds). Cc: Steffan Karger <steffan.kar...@fox-it.com> Signed-off-by: Antonio Quartulli <a...@unstable.cc> --- Tested on linux by using my VM. No test was performed on Windows* (compiled-only). Note: the check "!(session->opt->ssl_flags &

Re: [Openvpn-devel] [PATCH] reload CRL only if file was modified

2016-11-30 Thread Antonio Quartulli
;=. > good point! I think we should definitely switch to !=. Thanks! -- Antonio Quartulli -- ___ Openvpn-devel mailing list Openvpn-devel@lists.sourceforge.net https://lis

[Openvpn-devel] [PATCH v3] reload CRL only if file was modified

2016-12-01 Thread Antonio Quartulli
several seconds to few milliseconds). Cc: Steffan Karger <steffan.kar...@fox-it.com> Signed-off-by: Antonio Quartulli <a...@unstable.cc> --- Changes since v2: - print warning if stat() on CRL fails - abort CRL (re)load if stat() fails Changes since v1: - move tls_ctx_reload_crl() before an

Re: [Openvpn-devel] [PATCH v2] reload CRL only if file was modified

2016-12-01 Thread Antonio Quartulli
On Thu, Dec 01, 2016 at 09:13:36AM +0100, Steffan Karger wrote: > Hi, > > Tested on linux and windows, works as expected, except for one thing: > > On 01-12-16 07:55, Antonio Quartulli wrote: > > + /* > > + * an inline CRL can't change at runtime,

[Openvpn-devel] [PATCH] convert *_inline attributes to bool

2016-12-18 Thread Antonio Quartulli
Carrying around the INLINE_TAG is not really efficient, because it requires a strcmp() to be performed every time we want to understand if the data is stored inline or not. Convert all the *_inline attributes to bool to make the logic easier and checks more efficient. Signed-off-by: Antonio

Re: [Openvpn-devel] [PATCH] convert *_inline attributes to bool

2016-12-25 Thread Antonio Quartulli
On Sun, Dec 25, 2016 at 10:44:45AM +0100, Steffan Karger wrote: > > On 19-12-16 02:39, Antonio Quartulli wrote: > > Carrying around the INLINE_TAG is not really efficient, > > because it requires a strcmp() to be performed every > > time we want to understand if t

Re: [Openvpn-devel] [PATCH] convert *_inline attributes to bool

2016-12-25 Thread Antonio Quartulli
er of the encoded text anymore. Thus the comment should be moved or reworded to reflect this change. Cheers, -- Antonio Quartulli -- Developer Access Program for Intel Xeon Phi Processors Access to Intel Xeon Phi proc

Re: [Openvpn-devel] [PATCH] convert *_inline attributes to bool

2016-12-25 Thread Antonio Quartulli
On Sun, Dec 25, 2016 at 06:09:01PM +0800, Antonio Quartulli wrote: > On Sun, Dec 25, 2016 at 10:44:45AM +0100, Steffan Karger wrote: > > > > On 19-12-16 02:39, Antonio Quartulli wrote: > > > Carrying around the INLINE_TAG is not really efficient, > >

[Openvpn-devel] [PATCH v2] convert *_inline attributes to bool

2016-12-27 Thread Antonio Quartulli
tef...@karger.me> Signed-off-by: Antonio Quartulli <a...@unstable.cc> --- Based on master + [PATCH v3] reformatting: fix style in crypto*.{c, h} Changes from v1: - remove the INLINE_TAG from the options parsing logic at all. Now a boolean variable is passed around. - add print_if_inl

Re: [Openvpn-devel] Consider git tags for I60x

2017-03-22 Thread Antonio Quartulli
out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > ___ > Openvpn-devel mailing list > Openvpn-devel@lists.sourceforge.net > https://lists.so

Re: [Openvpn-devel] [PATCH] v2: resolve format string warnings

2017-03-25 Thread Antonio Quartulli
the git message when committed in the repository. version comments are useful during review to explain what was changed, but not useful to the git history per se. > Signed-off-by: Ilya Shipitsin <chipits...@gmail.com> > --- vX: change X, Y and Z. Again, this is nothing important, but I

[Openvpn-devel] [PATCH] CRL: use time_t instead of struct timespec to store last mtime

2017-03-16 Thread Antonio Quartulli
with a simple time_t. Reported-by: Gert Doering <g...@greenie.muc.de> Signed-off-by: Antonio Quartulli <a...@unstable.cc> --- Compiled tested on linux only as I can't build for windows in this very moment. src/openvpn/ssl.c | 4 ++-- src/openvpn/ssl_mbedtls.h | 2 +- src/openvpn/ssl_o

Re: [Openvpn-devel] [PATCH] Fix Building Using MSVC

2017-03-16 Thread Antonio Quartulli
quot;... > (slightly more code changes, but less portability hassle). > > Again, Antonio, your call... thanks for pointing this out. IMHO we could go for time_t and get rid of timespec at all. struct timespec was version in the first version of my patch, but it lost sense once it wa

Re: [Openvpn-devel] [PATCH v2] Fix windows-build format specifiers

2017-03-09 Thread Antonio Quartulli
and therefore a space would be needed between it and the next constant. This appears several times in the patch and therefore I thought it was worth mentioning it. Cheers, -- Antonio Quartulli signature.asc Description: Digital signature -

Re: [Openvpn-devel] NOTE: unable to redirect default gateway -- Cannot read current default gateway from system

2017-03-30 Thread Antonio Quartulli
On Fri, Mar 31, 2017 at 12:14:29AM +0200, Thomas Schäfer wrote: > By the way. > It works. (with 2.4.1) Glad to hear that! Thanks for reporting back. Cheers, -- Antonio Quartulli signature.asc Description: Digital sig

[Openvpn-devel] [PATCH v2] ntlm: avoid breaking anti-aliasing rules

2017-08-15 Thread Antonio Quartulli
From: Antonio Quartulli <anto...@open-mesh.com> The problem is visible when compiling with -O2: ntlm.c: In function ‘ntlm_phase_3’: ntlm.c:305:9: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] if ((*((long *)[0x14]) &

[Openvpn-devel] [PATCH v3] ntlm: avoid breaking anti-aliasing rules

2017-08-15 Thread Antonio Quartulli
From: Antonio Quartulli <anto...@openvpn.net> The problem is visible when compiling with -O2: ntlm.c: In function ‘ntlm_phase_3’: ntlm.c:305:9: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] if ((*((long *)[0x14]) &

Re: [Openvpn-devel] [PATCH v3] route: avoid definition of unused variables in certain configurations

2017-08-16 Thread Antonio Quartulli
Hi and thanks for reviewing this patch, On 16/08/17 20:41, Steffan Karger wrote: > Hi, > > On 16-08-17 13:46, Antonio Quartulli wrote: >> From: Antonio Quartulli <anto...@openvpn.net> >> >> Although this patch adds more ifdefs, this is an easy >>

[Openvpn-devel] [PATCH v2] route: avoid definition of unused variables in certain configurations

2017-08-16 Thread Antonio Quartulli
From: Antonio Quartulli <anto...@openvpn.net> Although this patch adds more ifdefs, this is an easy fix towards a no-warning-build process. A proper cleanup should be carried out later on route.c. Signed-off-by: Antonio Quartulli <anto...@openvpn.net> --- v2: - add commit message -

[Openvpn-devel] [PATCH v3] route: avoid definition of unused variables in certain configurations

2017-08-16 Thread Antonio Quartulli
From: Antonio Quartulli <anto...@openvpn.net> Although this patch adds more ifdefs, this is an easy fix towards a no-warning-build process. A proper cleanup should be carried out later on route.c. Signed-off-by: Antonio Quartulli <anto...@openvpn.net> --- v2: - add commit message -

[Openvpn-devel] [PATCH v4] route: avoid definition of unused variables in certain configurations

2017-08-16 Thread Antonio Quartulli
From: Antonio Quartulli <anto...@openvpn.net> Although this patch adds more ifdefs, this is an easy fix towards a no-warning-build process. A proper cleanup should be carried out later on route.c. Signed-off-by: Antonio Quartulli <anto...@openvpn.net> --- v2: - add commit message -

Re: [Openvpn-devel] [PATCH] fix compilation for --disable-multi

2017-08-16 Thread Antonio Quartulli
list > Openvpn-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/openvpn-devel > -- Antonio Quartulli signature.asc Description: OpenPGP digital signature -- Ch

[Openvpn-devel] [PATCH] remove the --disable-multi config switch

2017-08-16 Thread Antonio Quartulli
This switch is broken and unmaintained. However there wasn't any ticket about it so far, which means that it is practically unused. Get rid of it and simplify the P2MP logic. Signed-off-by: Antonio Quartulli <a...@unstable.cc> --- configure.ac | 8 src/openvpn/syshead

[Openvpn-devel] [PATCH v2] remove the --disable-multi config switch

2017-08-16 Thread Antonio Quartulli
This switch is broken and unmaintained. However there wasn't any ticket about it so far, which means that it is practically unused. Get rid of it and simplify P2MP logic. Signed-off-by: Antonio Quartulli <a...@unstable.cc> --- v2: remove ENABLE_CLIENT_SERVEr define from config-msvc.h

Re: [Openvpn-devel] [PATCH] Deprecate --keysize

2017-08-15 Thread Antonio Quartulli
n version. We can't contact them all. It's their responsibility to stay behind the changes in what they ship. If they don't, their users will complain aloud with them ;) On top of that, this does not prevent users from using the

[Openvpn-devel] [PATCH 1/5] make function declarations C99 compliant

2017-08-11 Thread Antonio Quartulli
From: Antonio Quartulli <anto...@openvpn.net> In the attempt of adhering to the C99 standard as much as possible, ensure that all the function declarations with no parameter contain the "void" keyword[1]. Defects identified with sparse[2]. [1] ISO/IEC 9899:1999 spec, TC3 - se

[Openvpn-devel] [PATCH 5/5] use NULL instead of 0 when assigning pointers

2017-08-11 Thread Antonio Quartulli
From: Antonio Quartulli <anto...@openvpn.net> Signed-off-by: Antonio Quartulli <anto...@openvpn.net> --- src/openvpn/ps.c | 2 +- src/openvpn/ssl_openssl.c| 2 +- src/openvpn/ssl_verify_openssl.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff

[Openvpn-devel] [PATCH 4/5] remove unused functions

2017-08-11 Thread Antonio Quartulli
From: Antonio Quartulli <anto...@openvpn.net> Signed-off-by: Antonio Quartulli <anto...@openvpn.net> --- src/openvpn/misc.c| 23 --- src/openvpn/ssl.c | 10 -- src/openvpn/ssl_openssl.c | 6 -- 3 files changed, 39 deletions(-) diff

[Openvpn-devel] [PATCH 3/5] add missing static attribute to functions

2017-08-11 Thread Antonio Quartulli
From: Antonio Quartulli <anto...@openvpn.net> Functions used only in the file where they are defined and not exported in any header, should always defined as static in order to make the scope clear to the compiler and the developers. Add the static attribute where missing. Sign

[Openvpn-devel] [PATCH 2/5] ensure function declarations are compiled with their definitions

2017-08-11 Thread Antonio Quartulli
From: Antonio Quartulli <anto...@openvpn.net> Function prototypes should be included when compiling their definitions so that it is clear to compilers and static analyzers that they are not static. This means that several declarations have to be moved to the related header files which i

[Openvpn-devel] [PATCH 0/5] generic code clean-up

2017-08-11 Thread Antonio Quartulli
ts against it. Cheers, Antonio Quartulli (5): make function declarations C99 compliant ensure function declarations are compiled with their definitions add missing static attribute to functions remove unused functions use NULL instead of 0 when assigning pointers src/openvp

[Openvpn-devel] [PATCH] ntlm: avoid breaking anti-aliasing rules

2017-08-11 Thread Antonio Quartulli
From: Antonio Quartulli <anto...@openvpn.net> The problem is visible when compiling with -O2: ntlm.c: In function ‘ntlm_phase_3’: ntlm.c:305:9: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] if ((*((long *)[0x14]) &

Re: [Openvpn-devel] [PATCH] tls-crypt: introduce tls_crypt_kt()

2017-08-11 Thread Antonio Quartulli
{ 0 }; > > +ctx->kt = tls_crypt_kt(); Now we don't have the NULL checks on ctx->kt.digest and ctx->kt.cipher anymore. I understand this there is no variable involved as we statically search for "AES-256-CTR" and "SHA256", however, shouldn't we at leas

Re: [Openvpn-devel] [PATCH v2] tls-crypt: introduce tls_crypt_kt()

2017-08-12 Thread Antonio Quartulli
> +if (!ctx->kt.cipher || !ctx->kt.digest) > { > -printf("No HMAC-SHA256 support, skipping test.\n"); > return 0; > } > -ctx->kt.cipher_length = cipher_kt_key_size(ctx->kt.cipher); > -ctx->kt.hmac_length = md_kt_

[Openvpn-devel] [PATCH 5/4] ntlm: unwrap multiple function calls

2017-07-11 Thread Antonio Quartulli
From: Antonio Quartulli <anto...@openvpn.net> In order to improve code readability it is better to unwrap multiple function calls onto multiple lines. Signed-off-by: Antonio Quartulli <anto...@openvpn.net> --- src/openvpn/ntlm.c | 3 ++- 1 file changed, 2 insertions(+), 1 delet

Re: [Openvpn-devel] [PATCH openvpn-build] fix test when white space is present

2017-07-17 Thread Antonio Quartulli
On 17/07/17 15:54, Samuli Seppänen wrote: > On 16/07/2017 13:47, Antonio Quartulli wrote: >> For some CHOST ret_want and ret_got may contain a whitespace. >> Add double quotes around ret_want to avoid messing up the test. >> >> Signed-off-by: Antonio

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

2017-07-10 Thread Antonio Quartulli
On 10/07/17 15:07, Gert Doering wrote: > Hi, > > On Mon, Jul 10, 2017 at 02:33:43PM +0800, Antonio Quartulli wrote: >> On 10/07/17 14:30, Gert Doering wrote: >>> On Mon, Jul 10, 2017 at 12:31:31PM +0800, Antonio Quartulli wrote: >>>> Instead of cluttering

[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 <a...@unstable.cc> --- src/openvpn/ntlm.

[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: conv

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

2017-07-09 Thread Antonio Quartulli
the multiple function call onto lines and make the core more readable. Signed-off-by: Antonio Quartulli <a...@unstable.cc> --- src/openvpn/ntlm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/openvpn/ntlm.c b/src/openvpn/ntlm.c index bb929283..f18e0371

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

2017-07-09 Thread Antonio Quartulli
several warnings from nmtl.c that you can catch with "-Wall -std=c99". Signed-off-by: Antonio Quartulli <a...@unstable.cc> --- src/openvpn/ntlm.c | 51 +++ 1 file changed, 27 insertions(+), 24 deletions(-) diff --git a/src/open

[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

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

2017-07-09 Thread Antonio Quartulli
and keep them under control (IMHO we should avoid having #ifdefs directly in the middle of the code as much as possible). Cheers, -- Antonio Quartulli signature.asc Description: OpenPGP digital signature -- Check o

[Openvpn-devel] [PATCH] tls-crypt: avoid warnings when --disable-crypto is used

2017-07-07 Thread Antonio Quartulli
From: Antonio Quartulli <anto...@openvpn.net> Avoid including the content of tls_crypt.h when --disable-crypto is used, as it will trigger some warnings due to missing structures declarations. Signed-off-by: Antonio Quartulli <anto...@openvpn.net> --- - also checked via travis-

Re: [Openvpn-devel] [PATCH] crypto: create function to initialize encrypt and decrypt key

2017-07-07 Thread Antonio Quartulli
Antonio Quartulli: > From: Steffan Karger <stef...@karger.me> > > Instead of always initialize the encrypt and decrypt keys separately, > implement an helper function init_key_ctx_bi() that takes care of > both of them for us. > > Reduces code duplication and impro

Re: [Openvpn-devel] [PATCH] crypto: create function to initialize encrypt and decrypt key

2017-07-07 Thread Antonio Quartulli
Antonio Quartulli: >> Acked-by: Antonio Quartulli <anto...@openvpn.net> >> Signed-off-by: Steffan Karger <stef...@karger.me> > > I have to retreat my ACK. This patch is generating some new warnings > that have to be fixed before being considered for merging. >

[Openvpn-devel] [PATCH] fix compilation for --disable-multi

2017-07-12 Thread Antonio Quartulli
ways push basic set of peer info values to server.") Reported-by: ValdikSS <valdi...@gmail.com> Signed-off-by: Antonio Quartulli <a...@unstable.cc> --- src/openvpn/init.c| 23 ++- src/openvpn/options.c | 4 +++- 2 files changed, 25 insertions(+), 2 deleti

Re: [Openvpn-devel] [PATCH] fix compilation for --disable-multi

2017-07-13 Thread Antonio Quartulli
On 13/07/17 14:45, Antonio Quartulli wrote: > $ git tag --contains eed9b8eec911a26a952f07ad18d4397c334ac089 > v2.3.10 > v2.3.11 > v2.3.12 > v2.3.13 > v2.3.14 > v2.3.15 > v2.3.16 > v2.3.17 > v2.3.2 > v2.3.3 > v2.3.4 > v2.3.5 > v2.3.6 > v2.3.7 &

[Openvpn-devel] [PATCH 1/2] use M_ERRNO instead of explicitly printing errno

2017-07-13 Thread Antonio Quartulli
From: Antonio Quartulli <anto...@openvpn.net> the msg() function will print the errno for us when provided with the M_ERRNO flag. Therefore, don't bother printing errno explicitly and always pass M_ERRNO to msg(). Signed-off-by: Antonio Quartulli <anto...@openvpn.net> --- - co

[Openvpn-devel] [PATCH 2/2] don't print errno twice

2017-07-13 Thread Antonio Quartulli
From: Antonio Quartulli <anto...@openvpn.net> when passing the M_ERRNO flag to msg(), the latter will already print the errno message (in a form of a string and number) for us, hence there is no need to explicitly print it a second time. Signed-off-by: Antonio Quartulli <anto...@op

Re: [Openvpn-devel] [PATCH] fix compilation for --disable-multi

2017-07-13 Thread Antonio Quartulli
On 13/07/17 14:34, Илья Шипицин wrote: > 2017-07-13 11:16 GMT+05:00 Samuli Seppänen <sam...@openvpn.net>: > >> On 13/07/2017 09:05, Antonio Quartulli wrote: >>> On 13/07/17 14:02, Илья Шипицин wrote: >>>> Should we add --disable-multi to some travis-

[Openvpn-devel] [PATCH v2] route: improve error message

2017-07-18 Thread Antonio Quartulli
- fix typ0 in message: NLSMG -> NLMSG - use strerror() to print a human readable message Signed-off-by: Antonio Quartulli <a...@unstable.cc> --- v2: - change %d to %s (thanks Michael Shiels for catching this) src/openvpn/route.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion

[Openvpn-devel] [PATCH] route: improve error message

2017-07-18 Thread Antonio Quartulli
- fix typ0 in message: NLSMG -> NLMSG - use strerror() to print a human readable message Signed-off-by: Antonio Quartulli <a...@unstable.cc> --- src/openvpn/route.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/openvpn/route.c b/src/openvpn/route.c index

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

2017-07-10 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 - >

[Openvpn-devel] [PATCH] management: preserve wait_for_push field when asking for user/pass

2017-07-07 Thread Antonio Quartulli
-pass if auth-token is pushed"). Thanks to David Sommerseth for the preliminary analysis and debugging. Reported-by: Steven Haigh <net...@crc.id.au> Signed-off-by: Antonio Quartulli <a...@unstable.cc> Tested-by: Steven Haigh <net...@crc.id.au> --- src/openvpn/manage.c | 4 +++-

[Openvpn-devel] [PATCH v3] route: improve error message

2017-07-20 Thread Antonio Quartulli
- fix typ0 in message: NLSMG -> NLMSG - use strerror() to print a human readable message - don't print error message if error is ENETUNREACH: it means no route found Signed-off-by: Antonio Quartulli <a...@unstable.cc> --- v2: - change %d to %s (thanks Michael Shiels for catching

[Openvpn-devel] [PATCH v3] route: improve error message

2017-07-20 Thread Antonio Quartulli
- fix typ0 in message: NLSMG -> NLMSG - use strerror() to print a human readable message - don't print error message if error is ENETUNREACH: it means no route found Signed-off-by: Antonio Quartulli <a...@unstable.cc> --- v2: - change %d to %s (thanks Michael Shiels for catching

Re: [Openvpn-devel] [PATCH v2] route: improve error message

2017-07-18 Thread Antonio Quartulli
On 19/07/17 05:16, Gert Doering wrote: > Hi, > > On Tue, Jul 18, 2017 at 09:46:12PM +0800, Antonio Quartulli wrote: >> - fix typ0 in message: NLSMG -> NLMSG >> - use strerror() to print a human readable message > > Thanks. What about "not printing an

Re: [Openvpn-devel] [PATCH] Support server cipher preference

2017-07-16 Thread Antonio Quartulli
(re-adding the ml: please keep it in the CC list) On 16/07/17 17:16, Szilárd Pfeiffer wrote: > On 2017-07-16 10:47, Antonio Quartulli wrote: >> Hi Szilárd, >> >> >> On 16/07/17 16:22, Szilárd Pfeiffer wrote: >>> --- >>> doc/openvpn.8

Re: [Openvpn-devel] [PATCH] Support server cipher preference

2017-07-16 Thread Antonio Quartulli
On 16/07/17 17:24, Antonio Quartulli wrote: > (re-adding the ml: please keep it in the CC list) > > On 16/07/17 17:16, Szilárd Pfeiffer wrote: >> On 2017-07-16 10:47, Antonio Quartulli wrote: >>> Hi Szilárd, >>> >>> >>> On 16/07/17 16:22, S

Re: [Openvpn-devel] [PATCH] Support server cipher preference

2017-07-16 Thread Antonio Quartulli
nt to an incompatible configuration? Cheers, -- Antonio Quartulli signature.asc Description: OpenPGP digital signature -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot

  1   2   3   4   5   6   7   8   9   10   >