[Openvpn-devel] [PATCH] Move strerror_ts() to error.h/c

2017-07-20 Thread Steffan Karger
Move strerror_ts() to error.c, which is a more suitable location than the random collection of unrelated stuff called misc.c. While doing so, simplify the implementation and remove the defines. strerror() is required by C89 and C99, and we require C99, so no need to check. We might want to switch

[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 --- v2: - change %d to %s (thanks Michael Shiels for catching this) v3: - don't print error wh

[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 --- v2: - change %d to %s (thanks Michael Shiels for catching this) v3: - don't print error wh

[Openvpn-devel] [PATCH v4] 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 --- v2: - change %d to %s (thanks Michael Shiels for catching this) v3: - don't print error wh

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

2017-07-20 Thread Илья Шипицин
any news ? 2017-07-12 20:50 GMT+05:00 Илья Шипицин : > > > 2017-07-12 20:06 GMT+05:00 Selva Nair : > >> >> On Wed, Jul 12, 2017 at 10:45 AM, Илья Шипицин >> wrote: >> >>> 2017-07-12 18:54 GMT+05:00 Selva Nair : >>> On Wed, Jul 12, 2017 at 4:46 AM, Илья Шипицин wrote: > N

[Openvpn-devel] [PATCH v3] Remove strerror_ts()

2017-07-20 Thread Steffan Karger
This function was only called in string format functions, which already copy the contents, so all this ever did was adding redundant malloc() and free() calls. Also, this wasn't as thread-safe as it claims: another thread could still change the string value between the strerror() and buf_printf()

Re: [Openvpn-devel] [PATCH v3] Remove strerror_ts()

2017-07-20 Thread Gert Doering
Hi, On Thu, Jul 20, 2017 at 12:51:53PM +0200, Steffan Karger wrote: > if ((flags & M_ERRNO) && e) > { > openvpn_snprintf(m2, ERR_BUF_SIZE, "%s: %s (errno=%d)", > - m1, strerror_ts(e, &gc), e); > + m1, strerror(e, &gc), e); Can I h

[Openvpn-devel] [PATCH v4] Remove strerror_ts()

2017-07-20 Thread Steffan Karger
This function was only called in string format functions, which already copy the contents, so all this ever did was adding redundant malloc() and free() calls. Also, this wasn't as thread-safe as it claims: another thread could still change the string value between the strerror() and buf_printf()

[Openvpn-devel] [PATCH applied] Re: Remove strerror_ts()

2017-07-20 Thread Gert Doering
ACK. Your patch has been applied to the master and release/2.4 branch. commit fd2a29ab2668fea9c0ac972d5ec69f00232c88b6 (master) commit 5315193bb9e83980ca24d4628c4e1adfb8f012a9 (release/2.4) Author: Steffan Karger Date: Thu Jul 20 13:39:00 2017 +0200 Remove strerror_ts() Signed-off-

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

2017-07-20 Thread Selva Nair
Hi, On Thu, Jul 20, 2017 at 4:36 AM, Илья Шипицин wrote: > any news ? > > 2017-07-12 20:50 GMT+05:00 Илья Шипицин : > >> >> >> 2017-07-12 20:06 GMT+05:00 Selva Nair : >> >>> >>> On Wed, Jul 12, 2017 at 10:45 AM, Илья Шипицин >>> wrote: >>> 2017-07-12 18:54 GMT+05:00 Selva Nair : >

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

2017-07-20 Thread Илья Шипицин
20 июл. 2017 г. 19:50 пользователь "Selva Nair" написал: Hi, On Thu, Jul 20, 2017 at 4:36 AM, Илья Шипицин wrote: > any news ? > > 2017-07-12 20:50 GMT+05:00 Илья Шипицин : > >> >> >> 2017-07-12 20:06 GMT+05:00 Selva Nair : >> >>> >>> On Wed, Jul 12, 2017 at 10:45 AM, Илья Шипицин >>> wrote:

[Openvpn-devel] [PATCH] Move openvpn_sleep() to manage.c

2017-07-20 Thread Steffan Karger
openvpn_sleep() is basically "service the management interface for x seconds, then return". Therefore, manage.c is a more suitable location than the random collection of unrelated stuff called misc.c. (I think we should find a better place for everything currently in misc.c, and get rid of it all

[Openvpn-devel] [PATCH v2] Always use default keysize for NCP'd ciphers

2017-07-20 Thread Steffan Karger
If a peer has set --keysize, and NCP negotiates a cipher with a different key size (e.g. --keysize 128 + AES-256-GCM), that peer will exit with a "invalid key size" error. To prevent that, always set keysize=0 for NCP'd ciphers. Signed-off-by: Steffan Karger --- v2 - print log message when we ov

[Openvpn-devel] [PATCH] fixup: also change missed openvpn_sleep() occurrences

2017-07-20 Thread Steffan Karger
45b2af9c missed some openvpn_sleep() occurrences in platform-specific code in tun.c - fix that. Signed-off-by: Steffan Karger --- src/openvpn/tun.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/openvpn/tun.c b/src/openvpn/tun.c index 68fb488..3639718 100644 ---

[Openvpn-devel] [PATCH applied] Re: Move openvpn_sleep() to manage.c

2017-07-20 Thread Gert Doering
ACK. Your patch has been applied to the master and release/2.4 branch. commit 45b2af9c7719d9a40c6c2b9d0693e4db0d917a04 (master) commit 80ece420966b21b9a6cee2a36a19e3d200dcd3e7 (release/2.4) Author: Steffan Karger Date: Thu Jul 20 18:00:35 2017 +0200 Move openvpn_sleep() to manage.c

[Openvpn-devel] [PATCH applied] Re: fixup: also change missed openvpn_sleep() occurrences

2017-07-20 Thread Gert Doering
ACK. Your patch has been applied to the master and release/2.4 branch. commit cdb262a6c78a29349789b7cf1813feaf7cc6e8c8 (master) commit 4a04be8b53df37cac0cd4df4d23a1e2210902232 (release/2.4) Author: Steffan Karger Date: Thu Jul 20 21:17:02 2017 +0200 fixup: also change missed openvpn_sleep

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

2017-07-20 Thread Gert Doering
ACK. Have no such recent Linux system around, but I trust you to have tested it - tested on older linuxes where it does not break anything, and the code looks reasonable. Your patch has been applied to the master and release/2.4 branch. commit 20d98427ef37e3b748dbcca2174cd243dcc963dc (master) c