Re: [Openvpn-devel] [PATCH 3/4] Merge almost identical create_socket_tcp and create_socket_tcp6

2012-08-01 Thread Arne Schwabe
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Am 01.08.12 22:38, schrieb Gert Doering: > Hi, > > On Wed, Aug 01, 2012 at 06:11:09PM +0200, Arne Schwabe wrote: >> @@ -1099,15 +1068,7 @@ socket_connect (socket_descriptor_t *sd, >> if (*signal_received) >> goto done; >> >> -

Re: [Openvpn-devel] [PATCH 3/4] Merge almost identical create_socket_tcp and create_socket_tcp6

2012-08-01 Thread Gert Doering
Hi, On Wed, Aug 01, 2012 at 06:11:09PM +0200, Arne Schwabe wrote: > @@ -1099,15 +1068,7 @@ socket_connect (socket_descriptor_t *sd, >if (*signal_received) > goto done; > > - switch(local->addr.sa.sa_family) > - { > - case PF_INET6: > - *sd = create_socket_tcp6

[Openvpn-devel] [PATCH 2/4] Merge getaddr_multi and getaddr6 into one function

2012-08-01 Thread Arne Schwabe
the getaddr6 and getaddr_mutli functions are duplicates of each other. Since we always require getaddrinfo to be present both function are merge into one openvpn_getaddrinfo. This functions also returns a standard struct addrinfo* so our resolve interface is closer to the standard unix

[Openvpn-devel] [PATCH 0/4] Cleanup patches

2012-08-01 Thread Arne Schwabe
The first patch is a corrected (read working) version of the patch I posted a while ago. For the last three patches. I am in the progress of looking through the socket.c code. The ultimate goal is to simplify the code and have good way of dealing with ipv4/ipv6 dual stack. These first

[Openvpn-devel] [PATCH 1/4] Fixes error: --key fails with EXTERNAL_PRIVATE_KEY: No such file or directory if --management-external-key is used

2012-08-01 Thread Arne Schwabe
Warn if both options are used at the same time. Signed-off-by: Arne Schwabe --- src/openvpn/options.c | 18 -- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/src/openvpn/options.c b/src/openvpn/options.c index 9f4ddbb..03dc82f 100644 ---

[Openvpn-devel] [PATCH 4/4] Simplify print_sockaddr_ex function, merge duplicate ipv4/ipv6 logic

2012-08-01 Thread Arne Schwabe
--- src/openvpn/socket.c | 89 ++ 1 file changed, 39 insertions(+), 50 deletions(-) diff --git a/src/openvpn/socket.c b/src/openvpn/socket.c index acc4f2b..8ab5872 100644 --- a/src/openvpn/socket.c +++ b/src/openvpn/socket.c @@ -2173,57 +2173,46

[Openvpn-devel] [PATCH 3/4] Merge almost identical create_socket_tcp and create_socket_tcp6

2012-08-01 Thread Arne Schwabe
--- src/openvpn/manage.c |4 ++-- src/openvpn/socket.c | 53 +++--- src/openvpn/socket.h |2 +- 3 files changed, 10 insertions(+), 49 deletions(-) diff --git a/src/openvpn/manage.c b/src/openvpn/manage.c index 3ef14e5..d0bb416 100644 ---

Re: [Openvpn-devel] [PATCH 2/2 fixed] add plugin_log() API to write to openvpn log

2012-08-01 Thread Alon Bar-Lev
On Wed, Aug 1, 2012 at 3:48 PM, Heiko Hund wrote: > On Wednesday 01 August 2012 15:27:01 Alon Bar-Lev wrote: >> How will it work on Windows? > > Good question. Can't it work on Windows? According to objdump openvpn.exe > exports all the symbols statically on Windows. Is

Re: [Openvpn-devel] [PATCH 2/2 fixed] add plugin_log() API to write to openvpn log

2012-08-01 Thread Heiko Hund
On Wednesday 01 August 2012 15:27:01 Alon Bar-Lev wrote: > How will it work on Windows? Good question. Can't it work on Windows? According to objdump openvpn.exe exports all the symbols statically on Windows. Is that a limitation of the PE format? If not, the alternative would be to pass the

Re: [Openvpn-devel] [PATCH 2/2 fixed] add plugin_log() API to write to openvpn log

2012-08-01 Thread Alon Bar-Lev
How will it work on Windows? Plugins should not require to be linked against anything. On Wed, Aug 1, 2012 at 2:57 PM, Heiko Hund wrote: > Some plugins want to add messages to the openvpn log file. The > plugin_log() API provides a way for them to do so. > > Signed-off-by:

[Openvpn-devel] [PATCH 2/2 fixed] add plugin_log() API to write to openvpn log

2012-08-01 Thread Heiko Hund
Some plugins want to add messages to the openvpn log file. The plugin_log() API provides a way for them to do so. Signed-off-by: Heiko Hund --- include/openvpn-plugin.h | 23 + src/openvpn/plugin.c | 51

[Openvpn-devel] [PATCH 2/2] add plugin_log() API to write to openvpn log

2012-08-01 Thread Heiko Hund
Some plugins want to add messages to the openvpn log file. The plugin_log() API provides a way for them to do so. Signed-off-by: Heiko Hund --- include/openvpn-plugin.h | 23 + src/openvpn/plugin.c | 51

[Openvpn-devel] [PATCH 1/2] add x_msg_va() log function

2012-08-01 Thread Heiko Hund
This change allows other functions to access the functionality in x_msg(). Needed for the plug-in logging API. Signed-off-by: Heiko Hund --- src/openvpn/error.c | 11 --- src/openvpn/error.h |2 ++ 2 files changed, 10 insertions(+), 3 deletions(-) diff

[Openvpn-devel] [PATCH 0/2] Add logging API for plug-ins

2012-08-01 Thread Heiko Hund
After some discussion on IRC, here's the mini patch series for adding a logging API for plug-ins. Changes from the previous patch: * split the changes to error.[ch] into separate patch * add a mandatory prefix "PLUGIN : " to each log line * never log the instance prefix as it's not thread