]> git.ipfire.org Git - thirdparty/openvpn.git/log
thirdparty/openvpn.git
14 years agoFor Mac OSX, when DARWIN_USE_IPCONFIG is defined, retry ipconfig
James Yonan [Tue, 12 Apr 2011 05:14:34 +0000 (05:14 +0000)] 
For Mac OSX, when DARWIN_USE_IPCONFIG is defined, retry ipconfig
command on failure once every second for up to 15 seconds.  This
is necessary to work around an issue observed on OSX 10.5 where
the ipconfig command sometimes fails if executed immediately after
the tun device open.

git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@7151 e7ae566f-a301-0410-adde-c780ea21d3b5

14 years agoAdd man page entry for --redirect-private
Samuli Seppänen [Tue, 29 Mar 2011 11:19:00 +0000 (11:19 +0000)] 
Add man page entry for --redirect-private

Trac-ticket: 107
Signed-off-by: Samuli Seppänen <samuli@openvpn.net>
Acked-by: David Sommerseth <dazo@users.sourceforge.net>
Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
14 years agoFixed bug in port-share that could cause port share process to
James Yonan [Sun, 3 Apr 2011 21:48:15 +0000 (21:48 +0000)] 
Fixed bug in port-share that could cause port share process to
crash with output like this:

TCP connection established with 85.190.0.3:41781
85.190.0.3:41781 SIGTERM[soft,port-share-redirect] received, client-instance exiting
MANAGEMENT: TCP recv error: Socket operation on non-socket
MANAGEMENT: Client disconnected
MANAGEMENT: Triggering management exit
Exiting due to fatal error
EVENT: epoll_ctl EPOLL_CTL_MOD failed, sd=6: Bad file descriptor (errno=9)

Then an error like this for every incoming connection that should be
proxied:

76.120.71.74:55302 PORT SHARE: sendmsg failed -- unable to communicate with background process (6,8,-1,-1): Connection refused (errno=111)

Version 2.1.3s

git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@7127 e7ae566f-a301-0410-adde-c780ea21d3b5

14 years agoFixed bug that incorrectly placed stricter TCP packet replay rules on
James Yonan [Sat, 2 Apr 2011 08:21:28 +0000 (08:21 +0000)] 
Fixed bug that incorrectly placed stricter TCP packet replay rules on
UDP sessions when the client daemon was running in UDP/TCP adaptive
mode, and transitioned from TCP to UDP.

The bug would cause a single dropped packet in UDP mode to trigger a
barrage of packet replay errors followed by a disconnect and
reconnect.

Version 2.1.3r

git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@7125 e7ae566f-a301-0410-adde-c780ea21d3b5

14 years agoAdded more packet ID debug info at debug level 3 for debugging
James Yonan [Thu, 31 Mar 2011 23:18:06 +0000 (23:18 +0000)] 
Added more packet ID debug info at debug level 3 for debugging
false positive packet replays.

Version 2.1.3q.

git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@7109 e7ae566f-a301-0410-adde-c780ea21d3b5

14 years agoFix the --client-cert-not-required feature
David Sommerseth [Wed, 30 Mar 2011 12:14:21 +0000 (14:14 +0200)] 
Fix the --client-cert-not-required feature

Commit 2e8337de248ef0b5b48cbb2964da0d5c3f28b15b introduced a new
feature for using other SSL certificate fields for authentication
than the CN field.

This commit introduced a bug, which made the verify_callback()
function getting called even if --client-cert-not-required was
enabled in the config.

The reason for this was that an 'else' statement was lacking a
couple of curly braces.  The offending commit in reality moved
the setup of the verify_callback() function out of the 'else'
statement.

Report-URL: https://community.openvpn.net/openvpn/ticket/108
Report-URL: https://forums.openvpn.net/topic7751.html
Signed-off-by: David Sommerseth <davids@redhat.com>
Acked-by: Jan Just Keijser <janjust@nikhef.nl>
14 years ago* ipv6-0.4.16: fix mingw32 build
JuanJo Ciarlante [Sun, 27 Mar 2011 21:41:22 +0000 (23:41 +0200)] 
* ipv6-0.4.16: fix mingw32 build

14 years ago* ipv6-0.4.15b: rebase over openvpn-testing-master
JuanJo Ciarlante [Fri, 25 Mar 2011 13:51:33 +0000 (14:51 +0100)] 
* ipv6-0.4.15b: rebase over openvpn-testing-master

14 years agoAdded ./configure --enable-osxipconfig option for Mac OS X which will
James Yonan [Sun, 27 Mar 2011 09:20:13 +0000 (09:20 +0000)] 
Added ./configure --enable-osxipconfig option for Mac OS X which will
enable the use of ipconfig (instead of ifconfig) for configuring the
IP address and netmask of the tun/tap adapter.

Version 2.1.3p

git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@7092 e7ae566f-a301-0410-adde-c780ea21d3b5

14 years agoAdded "auth-token" client directive, which is intended to be
James Yonan [Sat, 26 Mar 2011 21:16:40 +0000 (21:16 +0000)] 
Added "auth-token" client directive, which is intended to be
pushed by server, and that is used to offer a temporary session
token to clients that can be used in place of a password on
subsequent credential challenges.

This accomplishes the security benefit of preventing caching
of the real password while offering most of the advantages
of password caching, i.e. not forcing the user to re-enter
credentials for every TLS renegotiation or network hiccup.

auth-token does two things:

1. if password caching is enabled, the token replaces the
   previous password, and

2. if the management interface is active, the token is output
   to it:

     >PASSWORD:Auth-Token:<token>

Also made a minor change to HALT/RESTART processing when password
caching is enabled.  When client receives a HALT or RESTART message,
and if the message text contains a flags block (i.e. [FFF]:message),
if flag 'P' (preserve auth) is present in flags, don't purge the Auth
password.  Otherwise do purge the Auth password.

Version 2.1.3o

git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@7088 e7ae566f-a301-0410-adde-c780ea21d3b5

14 years ago* ipv6-0.4.15: add --multihome support to xBSD
JuanJo Ciarlante [Tue, 22 Mar 2011 20:59:23 +0000 (21:59 +0100)] 
* ipv6-0.4.15: add --multihome support to xBSD
  - _both_ for IPv4 (which was missing) and for IPv6
  - tested on OpenBSD 4.7, FreeBSD 8.1

14 years ago* ipv6-0.4.14: fix xinetd usage:
JuanJo Ciarlante [Mon, 21 Mar 2011 08:21:39 +0000 (09:21 +0100)] 
* ipv6-0.4.14: fix xinetd usage:
 - closes http://bugs.debian.org/574164
 - also needed for --disable-ipv6 builds
 - supports IPv6 from xinetd

14 years ago* fix --multihome for ipv6: IPV6_RECVPKTINFO
JuanJo Ciarlante [Sun, 6 Feb 2011 08:52:46 +0000 (09:52 +0100)] 
* fix --multihome for ipv6: IPV6_RECVPKTINFO
  - setsockopt IPV6_RECVPKTINFO (not IPV6_PKTINFO!)
  - do check for setsockopt() failures
  - append %<iface> in INFO msg

14 years ago* fix --multihome for ipv4: cmsg_len must compare against in_pktinfo
JuanJo Ciarlante [Wed, 22 Sep 2010 23:15:35 +0000 (01:15 +0200)] 
* fix --multihome for ipv4: cmsg_len must compare against in_pktinfo
  size, not the full 4+6 union, also use saner variable names.

14 years ago* undo mroute.c changes related to ipv6 payload,
JuanJo Ciarlante [Sat, 20 Feb 2010 19:28:40 +0000 (20:28 +0100)] 
* undo mroute.c changes related to ipv6 payload,
  nothing to do w/ipv6 transport afterall.

14 years ago* rebased to v2.1.1 release
JuanJo Ciarlante [Sat, 28 Nov 2009 17:19:14 +0000 (09:19 -0800)] 
* rebased to v2.1.1 release
* document {un,}trusted_ip6 in manpage

14 years ago* doc updates
JuanJo Ciarlante [Tue, 17 Nov 2009 19:00:05 +0000 (20:00 +0100)] 
* doc updates

14 years ago* fix --disable-ipv6 build
JuanJo Ciarlante [Thu, 12 Nov 2009 10:54:13 +0000 (11:54 +0100)] 
* fix --disable-ipv6 build

14 years ago* updated doc
JuanJo Ciarlante [Wed, 11 Nov 2009 16:25:09 +0000 (17:25 +0100)] 
* updated doc

14 years ago* polished redirect-gateway (ipv4 on ipv6 endpoints) support
JuanJo Ciarlante [Wed, 11 Nov 2009 14:35:31 +0000 (15:35 +0100)] 
* polished redirect-gateway (ipv4 on ipv6 endpoints) support

14 years ago* (prototype) fix for supporting "redirect-gateway" for tunneled ipv4 over ipv6 endpoints
JuanJo Ciarlante [Tue, 10 Nov 2009 22:46:46 +0000 (23:46 +0100)] 
* (prototype) fix for supporting "redirect-gateway" for tunneled ipv4 over ipv6 endpoints

14 years ago* no new funcionality, just small cleanups:
JuanJo Ciarlante [Tue, 20 Oct 2009 20:38:50 +0000 (22:38 +0200)] 
* no new funcionality, just small cleanups:
- cmdline options help: add tcp6/udp6 missing messages
- win32: expand usage of proto_is_udp(), proto_is_tcp()
- replace some memset(&obj, 0, sizeof obj) by openvpn's CLEAR(obj)

14 years ago* openbsd: no IFF_MULTICAST, #ifdef around it
JuanJo Ciarlante [Tue, 20 Oct 2009 20:38:26 +0000 (22:38 +0200)] 
* openbsd: no IFF_MULTICAST, #ifdef around it

14 years ago* doc updates
JuanJo Ciarlante [Mon, 12 Oct 2009 09:31:33 +0000 (11:31 +0200)] 
* doc updates

14 years ago* fixed segfault for undef address family in print_sockaddr_ex (thanks Marcel!)
JuanJo Ciarlante [Mon, 5 Oct 2009 12:44:20 +0000 (14:44 +0200)] 
* fixed segfault for undef address family in print_sockaddr_ex (thanks Marcel!)

14 years ago* socket.c: better buf logic in print_sockaddr_ex
JuanJo Ciarlante [Mon, 5 Oct 2009 10:24:20 +0000 (12:24 +0200)] 
* socket.c: better buf logic in print_sockaddr_ex

14 years ago* TODO.ipv6 update
JuanJo Ciarlante [Sun, 4 Oct 2009 22:18:34 +0000 (00:18 +0200)] 
* TODO.ipv6 update

14 years ago* fix multi-tcp crash (corrected assertion)
JuanJo Ciarlante [Wed, 30 Sep 2009 22:15:12 +0000 (00:15 +0200)] 
* fix multi-tcp crash (corrected assertion)

14 years ago* init.c: small in-doc tweaks
JuanJo Ciarlante [Mon, 28 Sep 2009 17:51:54 +0000 (19:51 +0200)] 
* init.c: small in-doc tweaks

14 years ago* init.c: document the ENABLE_MANAGEMENT place to work on
JuanJo Ciarlante [Mon, 28 Sep 2009 11:47:16 +0000 (13:47 +0200)] 
* init.c: document the ENABLE_MANAGEMENT place to work on

14 years ago* updated {README,TODO}.ipv6 from feedback at openvpn-devel mlist
JuanJo Ciarlante [Mon, 28 Sep 2009 10:16:26 +0000 (12:16 +0200)] 
* updated {README,TODO}.ipv6 from feedback at openvpn-devel mlist

14 years ago* renamed README.ipv6{.txt,}
JuanJo Ciarlante [Fri, 25 Sep 2009 21:20:41 +0000 (23:20 +0200)] 
* renamed README.ipv6{.txt,}

14 years ago* correctly setup hints.ai_socktype for getaddrinfo(),
JuanJo Ciarlante [Thu, 24 Sep 2009 18:09:55 +0000 (20:09 +0200)] 
* correctly setup hints.ai_socktype for getaddrinfo(),
  althought sorta hacky, see TODO.ipv6.

14 years ago* make possible to x-compile openvpn/win32 in Linux
JuanJo Ciarlante [Thu, 24 Sep 2009 17:59:32 +0000 (19:59 +0200)] 
* make possible to x-compile openvpn/win32 in Linux

14 years ago* doc update w/unittests results
JuanJo Ciarlante [Sat, 19 Sep 2009 20:07:25 +0000 (22:07 +0200)] 
* doc update w/unittests results

14 years ago* document ipv6 milestone status
JuanJo Ciarlante [Sat, 19 Sep 2009 19:58:15 +0000 (21:58 +0200)] 
* document ipv6 milestone status

14 years ago* ipv6 on win32 "milestone": 1st snapshot that passes all unittests
JuanJo Ciarlante [Sat, 19 Sep 2009 19:36:46 +0000 (21:36 +0200)] 
* ipv6 on win32 "milestone": 1st snapshot that passes all unittests

14 years ago* fixed win32 non-ipv6 build
JuanJo Ciarlante [Sat, 19 Sep 2009 16:33:40 +0000 (18:33 +0200)] 
* fixed win32 non-ipv6 build

14 years ago* added README.ipv6.txt
JuanJo Ciarlante [Thu, 17 Sep 2009 21:46:01 +0000 (23:46 +0200)] 
* added README.ipv6.txt

14 years ago* important fix for tcp6 reconnection
JuanJo Ciarlante [Tue, 15 Sep 2009 20:42:46 +0000 (22:42 +0200)] 
* important fix for tcp6 reconnection
  was incorrectly creating a PF_INET socket

14 years ago* support --disable-ipv6 build properly:
JuanJo Ciarlante [Tue, 15 Sep 2009 14:48:46 +0000 (16:48 +0200)] 
* support --disable-ipv6 build properly:
- tests now are pass (and fail) properly for ipv6/4 builds
* more GNU indenting

14 years ago* socket.c: use USE_PF_INET6 in switch constructs to actually toss them out,
JuanJo Ciarlante [Tue, 15 Sep 2009 07:22:46 +0000 (09:22 +0200)] 
* socket.c: use USE_PF_INET6 in switch constructs to actually toss them out,
  GNU indentation for my deltas

14 years ago* migrated all getaddrinfo() to getaddr6
JuanJo Ciarlante [Mon, 14 Sep 2009 19:51:54 +0000 (21:51 +0200)] 
* migrated all getaddrinfo() to getaddr6
* tests Ok: {loopback,remote}{udp,tcp}{4,6}

14 years ago* created getaddr6(), use it from resolve_remote()
JuanJo Ciarlante [Mon, 14 Sep 2009 16:31:42 +0000 (18:31 +0200)] 
* created getaddr6(), use it from resolve_remote()
  next: merge ipv{4,6} signal logic into one inside resolve_remote()
* passes {loopback,remote}{udp,tcp}{4,6} tests

14 years ago* rebased openvpn-2.1_rc1b.jjo.20061206.d.patch
JuanJo Ciarlante [Sun, 13 Sep 2009 11:43:04 +0000 (13:43 +0200)] 
* rebased openvpn-2.1_rc1b.jjo.20061206.d.patch
* passes {udp,tcp}x{v4,v6} loopback tests
* passes {udp,tcp}x{v6} remote tests

14 years agoClarify --tmp-dir option
chantra [Fri, 25 Mar 2011 09:24:30 +0000 (10:24 +0100)] 
Clarify --tmp-dir option

Signed-off-by: chantra <chantra@debuntu.org>
Acked-By: David Sommerseth <davids@redhat.com>
Signed-off-by: David Sommerseth <davids@redhat.com>
14 years agowin/sign.py now accepts an optional tap-dir argument.
James Yonan [Fri, 25 Mar 2011 11:06:16 +0000 (11:06 +0000)] 
win/sign.py now accepts an optional tap-dir argument.

git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@7086 e7ae566f-a301-0410-adde-c780ea21d3b5

14 years agoUse a version-less version identifier on the master branch
David Sommerseth [Fri, 25 Mar 2011 08:45:11 +0000 (09:45 +0100)] 
Use a version-less version identifier on the master branch

Signed-off-by: David Sommerseth <davids@redhat.com>
14 years agocommon_name passing in auth_pam plugin
Joe Patterson [Mon, 21 Mar 2011 22:02:59 +0000 (18:02 -0400)] 
common_name passing in auth_pam plugin

Added the ability to have "COMMONNAME" replaced with certificate common
name in pam conversation.

Signed-off-by: Joe Patterson <j.m.patterson@gmail.com>
Acked-By: David Sommerseth <davids@redhat.com>
Signed-off-by: David Sommerseth <davids@redhat.com>
14 years agoFixed typo in plugin.h
Stefan Hellermann [Mon, 28 Feb 2011 15:53:26 +0000 (16:53 +0100)] 
Fixed typo in plugin.h

A additional ';' had sneaked in commit 4c4b8cedfa98e8892a53.  Lets
kick it out again.

Signed-off-by: Stefan Hellermann <stefan@the2masters.de>
Acked-by: David Sommerseth <davids@redhat.com>
Signed-off-by: David Sommerseth <davids@redhat.com>
14 years agoplugin.h: update prototype of plugin_call dummy in !ENABLE_PLUGIN case
Stefan Hellermann [Sun, 27 Feb 2011 21:15:44 +0000 (22:15 +0100)] 
plugin.h: update prototype of plugin_call dummy in !ENABLE_PLUGIN case

Commit 2db5a0ac3e053857d97e468de53e70a605f54561 adds two arguments to
plugin_call(...), but missed the !ENABLE_PLUGIN case. With
!ENABLE_PLUGIN, plugin_call(...) is only a dummy, so add these two
parameters there too.

Signed-off-by: Stefan Hellermann <stefan@the2masters.de>
Acked-by: David Sommerseth <davids@redhat.com>
Signed-off-by: David Sommerseth <davids@redhat.com>
14 years agoSeparate the general plug-in version constant and v3 plug-in structs version
David Sommerseth [Thu, 6 Jan 2011 22:24:52 +0000 (23:24 +0100)] 
Separate the general plug-in version constant and v3 plug-in structs version

After a review of the second round of the the v3 plug-in implementation, it
was decided to use a separate constant defining the version of the structs
used for argument and return value passing, instead of OPENVPN_PLUGIN_VERSION.

To not make it too complex, this patch uses a shared version constant for all
the v3 structures.  It is not expected that these strucutures will change too
much and too often.

Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
Acked-by: James Yonan <james@openvpn.net>
14 years agoAdded a simple plug-in demonstrating the v3 plug-in API.
David Sommerseth [Fri, 10 Dec 2010 00:20:43 +0000 (01:20 +0100)] 
Added a simple plug-in demonstrating the v3 plug-in API.

To build the plug-in, do ./build log_v3 in the plugin/examples directory.

This plug-in can be tested by running an OpenVPN server like this:

 # ./openvpn --plugin plugin/examples/log_v3.so --dev tun \
             --server 192.168.240.0 255.255.255.0 --ca sample-keys/ca.crt \
             --cert sample-keys/server.crt --key sample-keys/server.key \
             --dh sample-keys/dh1024.pem

The client can be started like this:

 # ./openvpn --client --remote localhost --ca sample-keys/ca.crt \
             --cert sample-keys/client.crt --key sample-keys/client.key \
             --dev tun --nobind --auth-user-pass

This plug-in will only log arguments and environment variables it receives
during all the different plug-in phases OpenVPN currently supports.  It will
also parse the X509 certificate information given during the TLS_VERIFY phase.

Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
Acked-by: James Yonan <james@openvpn.net>
14 years agoExtend the v3 plug-in API to send over X509 certificates
David Sommerseth [Fri, 10 Dec 2010 00:16:09 +0000 (01:16 +0100)] 
Extend the v3 plug-in API to send over X509 certificates

The certificates sent to the plug-in API will only happen during the
OPENVPN_PLUGIN_TLS_VERIFY phase and will contain a pointer to the OpenSSL
X509 certificate data.

Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
Acked-by: James Yonan <james@openvpn.net>
14 years agoImplement the core v3 plug-in function calls.
David Sommerseth [Thu, 9 Dec 2010 23:15:27 +0000 (00:15 +0100)] 
Implement the core v3 plug-in function calls.

Let OpenVPN call the openvpn_plugin_open_v3() and
openvpn_plugin_func_v3() plug-in functions if they exist in the plug-in.

Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
Acked-by: James Yonan <james@openvpn.net>
14 years agoDefine the new openvpn_plugin_{open,func}_v3() API
David Sommerseth [Thu, 9 Dec 2010 23:09:20 +0000 (00:09 +0100)] 
Define the new openvpn_plugin_{open,func}_v3() API

This just implements the basic API changes needed for the newer and more
flexible plug-in API.

Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
Acked-by: James Yonan <james@openvpn.net>
14 years agoProvide 'dev_type' environment variable to plug-ins and script hooks
David Sommerseth [Mon, 29 Nov 2010 22:57:44 +0000 (23:57 +0100)] 
Provide 'dev_type' environment variable to plug-ins and script hooks

Normally OpenVPN is configured with --dev {tun,tap}, but it is also possible
to use --dev myvpn instead.  In these situations, OpenVPN will request
--dev-type as well to be able to set up a tun or tap device properly.

The 'dev' environment variable will contain the value provided by --dev.  In
those cases where the plug-in/script need to behave differently when using a tun
device versus using a tap device, there are no possibilities for it to know what
kind of device --dev myvpn would be.

This patch adds a 'dev_type' environment variable which contains a string of the
device type, either automatically discovered based on the --dev name, or set using
the --dev-type option.

Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
Acked-by: James Yonan <james@openvpn.net>
14 years agoMisc fixes to r6708.
James Yonan [Mon, 13 Dec 2010 09:27:08 +0000 (09:27 +0000)] 
Misc fixes to r6708.

Fixed issue where "signal SIGTERM" entered from the management
interface might get subsequently downgraded to a SIGUSR1.

git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@6716 e7ae566f-a301-0410-adde-c780ea21d3b5

14 years agoAdded "management-external-key" option. This option can be used
James Yonan [Thu, 9 Dec 2010 11:21:04 +0000 (11:21 +0000)] 
Added "management-external-key" option.  This option can be used
instead of "key" in client mode, and allows the client to run
without the need to load the actual private key.  When the SSL
protocol needs to perform an RSA sign operation, the data to
be signed will be sent to the management interface via a
notification as follows:

  >RSA_SIGN:[BASE64_DATA]

The management interface client should then sign BASE64_DATA
using the private key and return the signature as follows:

  rsa-sig
  [BASE64_SIG_LINE]
  .
  .
  .
  END

This capability is intended to allow the use of arbitrary
cryptographic service providers with OpenVPN via the
management interface.

git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@6708 e7ae566f-a301-0410-adde-c780ea21d3b5

14 years agoFixed compiling issues when using --disable-crypto
James Yonan [Sun, 14 Nov 2010 22:38:47 +0000 (23:38 +0100)] 
Fixed compiling issues when using --disable-crypto

Peter Korsgaard <jacmet@sunsite.dk> reported an issue [1] when compiling
with --disable-crypto activated.  He suggested a patch, which only
partly solved the issue.  SVN r6568 / commit 3cf9dd88fd84108 added a
new feature which further made it impossible to compile without crypto.

This patch fixes both issues, based on Peter Korsgaard's patch.

[1] <http://sourceforge.net/mailarchive/forum.php?thread_name=87fwx08bod.fsf%40macbook.be.48ers.dk&forum_name=openvpn-devel>

Signed-off-by: James Yonan <james@openvpn.net>
Acked-by: David Sommerseth <dazo@users.sourceforge.net>
Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
14 years agoAdd extv3 X509 field support to --x509-username-field
Markus Koetter [Fri, 10 Dec 2010 19:30:09 +0000 (20:30 +0100)] 
Add extv3 X509 field support to --x509-username-field

This allows using other X509 certificate fields for the certificate
authentication.  To use altSubjectName, use
--x509-username-field ext:altSubjectName

This feature requires OpenVPN to be built with --enable-x509-alt-username

This patch is slightly modified, to honour --enable-x509-alt-username
compile time configuration.  Two #ifdef's are added.

Signed-off-by: Markus Koetter <koetter@rrzn-hiwi.uni-hannover.de>
Signed-off-by: David Sommerseth <davids@redhat.com>
Acked-by: David Sommerseth <davids@redhat.com>
Signed-off-by: David Sommerseth <davids@redhat.com>
14 years agoPreparing for the v2.2-RC2 release v2.2-RC2
David Sommerseth [Thu, 24 Mar 2011 21:01:20 +0000 (22:01 +0100)] 
Preparing for the v2.2-RC2 release

Signed-off-by: David Sommerseth <davids@redhat.com>
14 years agoWindows cross-compile cleanup
Alon Bar-Lev [Fri, 4 Mar 2011 21:14:33 +0000 (23:14 +0200)] 
Windows cross-compile cleanup

It should be sufficient to just try to see if socklen_t is defined.
Next, on all platforms it would be int in all other platforms.
And, there is no need to check for the type in monolitic environment
like Windows, as it will be always the same.

Currently it fails cross compile windows in mingw-w64 compiler, as
winsock.h is as follows:
   """
     /* define WINSOCK_API_LINKAGE and WSAAPI for less
      * diff output between winsock.h and winsock2.h, but
      * remember to undefine them at the end of file */
   """
And the macro uses these macros which are internal winsock macros and
should not be used anyway.

Also, when did the autodefs.h went mandatory? Why is it in
tap-win32/common.h while no constant is actually used?

The use of WSA_IO_INCOMPLETE without including winsock2.h is invalid!
Look at http://msdn.microsoft.com/en-us/library/aa921087.aspx

Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
Acked-by: James Yonan <james@openvpn.net>
Signed-off-by: David Sommerseth <davids@redhat.com>
14 years agoClarified --client-config-dir section on the man-page.
Samuli Seppänen [Thu, 24 Mar 2011 19:17:10 +0000 (21:17 +0200)] 
Clarified --client-config-dir section on the man-page.

Signed-off-by: Samuli Seppänen <samuli@openvpn.net>
Acked-by: David Sommerseth <davids@redhat.com>
Signed-off-by: David Sommerseth <davids@redhat.com>
14 years agoClarify default value for the --inactive option.
David Sommerseth [Thu, 24 Mar 2011 13:51:48 +0000 (14:51 +0100)] 
Clarify default value for the --inactive option.

It is not clear in the manual that this feature is disabled
by default.

Signed-off-by: David Sommerseth <davids@redhat.com>
Acked-by: Gert Doering <gert@greenie.muc.de>
14 years agoOpen log files as text files on Windows
David Sommerseth [Mon, 13 Dec 2010 11:49:00 +0000 (12:49 +0100)] 
Open log files as text files on Windows

By giving the "t" flag to _fdopen() on Windows, the file will be
opened in a "translate mode", where it will take care of converting
\n to \r\n, and also look for the CTRL-Z mark when opening the log
file in append mode.

Reference:
<http://msdn.microsoft.com/en-us/library/dye30d82%28VS.80%29.aspx>

Thanks to Alon Bar-Lev for pointing out this solution.

Reported-by: Thomas Reifferscheid
Signed-off-by: David Sommerseth <davids@redhat.com>
Acked-by: Gert Doering <gert@greenie.muc.de>
14 years agoFixes to Makefile.am
Samuli Seppänen [Wed, 23 Mar 2011 12:14:32 +0000 (14:14 +0200)] 
Fixes to Makefile.am

Removed reference to config-win32.h, which has been removed. Added
management-notes.txt to dist_doc_DATA.

Signed-off-by: Samuli Seppänen <samuli@openvpn.net>
Acked-by: David Sommerseth <davids@redhat.com>
Signed-off-by: David Sommerseth <davids@redhat.com>
14 years agoUpdated INSTALL-win32.txt
Samuli Seppänen [Tue, 15 Mar 2011 14:38:07 +0000 (16:38 +0200)] 
Updated INSTALL-win32.txt

Signed-off-by: Samuli Seppänen <samuli@openvpn.net>
Acked-by: Gert Doering <gert@greenie.muc.de>
Signed-off-by: David Sommerseth <davids@redhat.com>
14 years agoReplaced config-win32.h with win/config.h.in
Samuli Seppänen [Tue, 15 Mar 2011 14:37:41 +0000 (16:37 +0200)] 
Replaced config-win32.h with win/config.h.in

The original config-win32.h - a static header file - has been superceded by both
"domake-win" script and the new Python-based buildsystem. Transformed it into a
template file, win/config.h.in, which obtains the most commonly used build
parameters from win/settings.in.

Added support code to win/config.py and win/wb.py to preprocess win/config.h.in
and copy it to config.h, from where source and header files can find it.

Removed all references to config-win32.h. Also removed obsolete
PACKAGE_BUGREPORT and USE_PTHREAD variables from the win/config.h.in file.

Signed-off-by: Samuli Seppänen <samuli@openvpn.net>
Acked-by: James Yonan <james@openvpn.net>
Signed-off-by: David Sommerseth <davids@redhat.com>
14 years agoFixes to win/openvpn.nsi
Samuli Seppänen [Tue, 15 Mar 2011 14:36:41 +0000 (16:36 +0200)] 
Fixes to win/openvpn.nsi

Added support for generating installer with unsigned TAP drivers. Fixed Windows
Vista/7 Start menu shortcut uninstall failure.

Signed-off-by: Samuli Seppänen <samuli@openvpn.net>
Acked-by: James Yonan <james@openvpn.net>
Signed-off-by: David Sommerseth <davids@redhat.com>
14 years agoAdded support for prebuilt TAP-drivers. Automated embedding manifests.
Samuli Seppänen [Tue, 8 Mar 2011 14:07:49 +0000 (16:07 +0200)] 
Added support for prebuilt TAP-drivers. Automated embedding manifests.

Removed win/make_dist.py's dependency on TAP-driver and tapinstall.exe building.
Also added manifest embedding commands to win/make_dist.py. To avoid duplicate
code moved the "build_vc" method from win/build.py to win/wb.py and renamed it
"run_in_vs_shell".

Signed-off-by: Samuli Seppänen <samuli@openvpn.net>
Acked-by: James Yonan <james@openvpn.net>
Signed-off-by: David Sommerseth <davids@redhat.com>
14 years agoVersion 2.1.3n
James Yonan [Mon, 21 Mar 2011 09:00:39 +0000 (09:00 +0000)] 
Version 2.1.3n

git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@7069 e7ae566f-a301-0410-adde-c780ea21d3b5

14 years agoClient will now try to reconnect if no push reply received
James Yonan [Sun, 20 Mar 2011 19:43:06 +0000 (19:43 +0000)] 
Client will now try to reconnect if no push reply received
within handshake-window seconds.

git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@7066 e7ae566f-a301-0410-adde-c780ea21d3b5

14 years agoExtended "client-kill" management interface command (server-side)
James Yonan [Sun, 20 Mar 2011 04:12:26 +0000 (04:12 +0000)] 
Extended "client-kill" management interface command (server-side)
to accept an optional message string.  The message string format is:

  RESTART|HALT,<human-readable-message>

RESTART will tell the client to restart (i.e. SIGUSR1).

HALT will tell the client to exit (i.e. SIGTERM).

On the client, human-readable-message will be communicated via
management interface:

  >NOTIFY,<severity>,<type>,<human-readable-message>"

Version 2.1.3m

git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@7063 e7ae566f-a301-0410-adde-c780ea21d3b5

14 years agoFixed bug introduced in r7031 that might cause this error message:
James Yonan [Sun, 20 Mar 2011 03:57:28 +0000 (03:57 +0000)] 
Fixed bug introduced in r7031 that might cause this error message:

PORT SHARE: sendmsg failed (unable to communicate with background process)

git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@7062 e7ae566f-a301-0410-adde-c780ea21d3b5

14 years agoFixed issue where a client might receive multiple push replies from
James Yonan [Fri, 18 Mar 2011 04:51:59 +0000 (04:51 +0000)] 
Fixed issue where a client might receive multiple push replies from
a server if it sent multiple push requests due to the server being
slow to respond.  This could cause the client to process pushed
options twice, leading to duplicate pushed routes, among other issues.
The fix, implemented server-side, is to reply only once to a push
request even if multiple requests are received.

git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@7060 e7ae566f-a301-0410-adde-c780ea21d3b5

14 years agoenv_filter_match now includes the serial number of all certs
James Yonan [Thu, 17 Mar 2011 20:04:56 +0000 (20:04 +0000)] 
env_filter_match now includes the serial number of all certs
in chain (as tls_serial_n vars), rather than only tls_serial_0.

git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@7055 e7ae566f-a301-0410-adde-c780ea21d3b5

14 years agoRenamed branch to reflect that it is no longer beta.
James Yonan [Thu, 17 Mar 2011 04:55:47 +0000 (04:55 +0000)] 
Renamed branch to reflect that it is no longer beta.

git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@7051 e7ae566f-a301-0410-adde-c780ea21d3b5

14 years agoImplement IPv6 in TUN mode for Windows TAP driver.
Gert Doering [Sun, 7 Mar 2010 18:28:55 +0000 (19:28 +0100)] 
Implement IPv6 in TUN mode for Windows TAP driver.

* install-win32/settings.in: bump version to 9.7, TAP_RELDATE to "07/03/2010".

* tap-win32/proto.h: add data types and definitions needed for IPv6

* tap-win32/types.h: add m_UserToTap_IPv6 ethernet header for IPv6 packets

* tap-win32/tapdrvr.c: implement support for IPv6 in TUN mode:
     - IPv6 packets User->OS need correct ether type
     - IPv6 packets OS->User get correctly forwarded
     - IPv6 neighbour discovery packets for "fe80::8" (magic address
       installed as route-nexthop by OpenVPN.exe) get answered locally
(cherry picked from commit 175e17a5abd5969f6803a9cc9587b7959e1100ae)

Signed-off-by: Gert Doering <gert@greenie.muc.de>
Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
14 years agoFix line continuation in chkconfig init script description.
Ville Skyttä [Mon, 28 Feb 2011 21:28:54 +0000 (23:28 +0200)] 
Fix line continuation in chkconfig init script description.

See the chkconfig(8) man page for details.

Signed-off-by: Ville Skyttä <ville.skytta@iki.fi>
Acked-by: David Sommerseth <davids@redhat.com>
Signed-off-by: David Sommerseth <davids@redhat.com>
14 years agoFix packaging of config-win32.h and service-win32/msvc.mak v2.2-RC
David Sommerseth [Mon, 28 Feb 2011 13:57:49 +0000 (14:57 +0100)] 
Fix packaging of config-win32.h and service-win32/msvc.mak

The config-win32.h and service-win32/msvc.mak was not included
into the final source balls when using 'make dist', which is
crucial for Windows building.

Signed-off-by: David Sommerseth <davids@redhat.com>
Acked-by: Samuli Seppänen <samuli@openvpn.net>
14 years agoPreparing for the OpenVPN 2.2-RC release
David Sommerseth [Mon, 28 Feb 2011 10:36:13 +0000 (11:36 +0100)] 
Preparing for the OpenVPN 2.2-RC release

Signed-off-by: David Sommerseth <davids@redhat.com>
14 years agoTemporary snprintf-related fix to service-win32/openvpnserv.c
Samuli Seppänen [Fri, 18 Feb 2011 09:39:27 +0000 (11:39 +0200)] 
Temporary snprintf-related fix to service-win32/openvpnserv.c

This is intended just as a TEMPORARY solution to get the 2.2-RC released.
The intesion is to get this fixed with a better solution for the final 2.2
release.  This patch has also been discussed here:

http://thread.gmane.org/gmane.network.openvpn.devel/4325/

The only reason for this patch to be accepted in its current shape, is
that it will be fixed before the final 2.2 release.

Signed-off-by: Samuli Seppänen <samuli@openvpn.net>
Acked-by: David Sommerseth <davids@redhat.com>
Signed-off-by: David Sommerseth <davids@redhat.com>
14 years agoChanges to buildsystem patchset
Samuli Seppänen [Sat, 19 Feb 2011 08:15:12 +0000 (10:15 +0200)] 
Changes to buildsystem patchset

Implemented changes to the buildsystem patchset suggested by jamesyonan in IRC
meeting on 17th Feb 2010:

1) Remove variables added to version.m4 and use win/settings.in instead
2) Add ENABLE_<FEATURE> configuration to win/settings.in instead of parsing
   config-win32.h for them

This patch applies on top of the previous 13 patches.

Signed-off-by: Samuli Seppänen <samuli@openvpn.net>
Acked-by: James Yonan <james@openvpn.net>
Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
14 years agoAdded first version of NSI installer script to win/openvpn.nsi
Samuli Seppänen [Fri, 11 Feb 2011 14:32:35 +0000 (16:32 +0200)] 
Added first version of NSI installer script to win/openvpn.nsi

This win/openvpn.nsi file is a heavily cleaned-up version of the
install-win32/openvpn.nsi file. The key differences:

- paths have been adapted to new buildsystem's requirements
- obsolete XGUI support has been removed
- unused Windows version detection has been removed
- variables specific to new build system (win/settings.in, version.m4) are
  imported
- a few new installer options have been introduced:
  - install lzo2.dll
  - install msvcr90.dll (a requirement from VS2008 builds)

Signed-off-by: Samuli Seppänen <samuli@openvpn.net>
Acked-by: James Yonan <james@openvpn.net>
Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
14 years agoCopied install-win32/setpath.nsi to win/setpath.nsi
Samuli Seppänen [Fri, 11 Feb 2011 14:31:18 +0000 (16:31 +0200)] 
Copied install-win32/setpath.nsi to win/setpath.nsi

Signed-off-by: Samuli Seppänen <samuli@openvpn.net>
Acked-by: James Yonan <james@openvpn.net>
Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
14 years agoSeveral modifications to win/make_dist.py to allow building the NSI installer
Samuli Seppänen [Fri, 11 Feb 2011 14:25:40 +0000 (16:25 +0200)] 
Several modifications to win/make_dist.py to allow building the NSI installer

Added copying of all remaining openvpn dependencies to dist directory so that
the NSI installer script (win/openvpn.nsi) can find and use them more easily.
This includes openvpn.exe, openvpnserv.exe, libpkcs11-helper-1.dll, openssl.exe,
and example files. The associated, external DDL/manifest files are copied also,
so that embedding them with mt.exe is easier. This is a temporary solution until
nmake makefiles are modified to automate this process, except for a few of the
library dependencies (lzo2.dll and libpkcs11-helper-1.dll).

Signed-off-by: Samuli Seppänen <samuli@openvpn.net>
Acked-by: James Yonan <james@openvpn.net>
Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
14 years agoAdded comments to win/build_ddk.py
Samuli Seppänen [Fri, 11 Feb 2011 14:22:51 +0000 (16:22 +0200)] 
Added comments to win/build_ddk.py

Signed-off-by: Samuli Seppänen <samuli@openvpn.net>
Acked-by: James Yonan <james@openvpn.net>
Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
14 years agoAdded openvpnserv.exe building to win/build.py
Samuli Seppänen [Fri, 11 Feb 2011 14:20:43 +0000 (16:20 +0200)] 
Added openvpnserv.exe building to win/build.py

Made win/build.py call nmake in service-win32 directory to build openvpnserv.exe
after main build (openvpn.exe) has finished.

Signed-off-by: Samuli Seppänen <samuli@openvpn.net>
Acked-by: James Yonan <james@openvpn.net>
Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
14 years agoAdded configure.h and version.m4 variable parsing to win/config.py
Samuli Seppänen [Fri, 11 Feb 2011 14:16:14 +0000 (16:16 +0200)] 
Added configure.h and version.m4 variable parsing to win/config.py

Python-based buildsystem uses win/config.py to obtain global build parameters
from various sources. Added parsing of the (fake) configure.h and version.m4 to
it so that other Python build files can use them.

Signed-off-by: Samuli Seppänen <samuli@openvpn.net>
Acked-by: James Yonan <james@openvpn.net>
Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
14 years agoAdded command-line switch to win/build_all.py to skip TAP driver building
Samuli Seppänen [Fri, 11 Feb 2011 14:14:28 +0000 (16:14 +0200)] 
Added command-line switch to win/build_all.py to skip TAP driver building

Modified win/build_all.py so that by giving -n or --notap switch the TAP driver
is not built. This is useful if using prebuilt TAP drivers, or when WinDDK is
not installed.

Signed-off-by: Samuli Seppänen <samuli@openvpn.net>
Acked-by: James Yonan <james@openvpn.net>
Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
14 years agoAdded comments and made small modifications to win/msvc.mak.in
Samuli Seppänen [Fri, 11 Feb 2011 14:06:05 +0000 (16:06 +0200)] 
Added comments and made small modifications to win/msvc.mak.in

The win/msvc.mak.in file is used as basis for msvc.mak file which drives
openvpn.exe building. This change separates output file from LINK32_FLAGS and
adds helpful comments to the win/msvc.mak.in file.

Signed-off-by: Samuli Seppänen <samuli@openvpn.net>
Acked-by: James Yonan <james@openvpn.net>
Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
14 years agoAdded support for viewing config-win32.h paramters to win/show.py
Samuli Seppänen [Fri, 11 Feb 2011 14:03:31 +0000 (16:03 +0200)] 
Added support for viewing config-win32.h paramters to win/show.py

The win/show.py tools is used to view build parameters interactively. This
changes it so that it displays parameters parsed from config-win32.h in addition
to those from win/settings.in.

Signed-off-by: Samuli Seppänen <samuli@openvpn.net>
Acked-by: James Yonan <james@openvpn.net>
Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
14 years agoAdded helper functionality to win/wb.py
Samuli Seppänen [Fri, 11 Feb 2011 13:53:19 +0000 (15:53 +0200)] 
Added helper functionality to win/wb.py

This change adds several helper functions to win/wb.py:

- config-win32.h parser (to read build configuration options)
- helper function to cd to service-win32 for openvpnserv.exe building
- code to dynamically generate TAP-driver -related variables from version.m4,
  required by tap-win32/tapdrv.c
- configure.h generator to allow viewing build options using openvpn --version
- creation of temporary version.m4-based file to allow importing it's variables
  to the NSI installer script (win/openvpn.nsi)
- helper function to rename files (used in win/make_dist.py)

Signed-off-by: Samuli Seppänen <samuli@openvpn.net>
Acked-by: James Yonan <james@openvpn.net>
Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
14 years agoMoved TAP-driver version info to version.m4. Cleaned up win/settings.in.
Samuli Seppänen [Fri, 11 Feb 2011 13:28:13 +0000 (15:28 +0200)] 
Moved TAP-driver version info to version.m4. Cleaned up win/settings.in.

Previously parts of TAP-driver version information were stored in
win/settings.in. This patch moves all of it to version.m4. This patch also
cleans up and adds comments to win/settings.in

Signed-off-by: Samuli Seppänen <samuli@openvpn.net>
Acked-by: James Yonan <james@openvpn.net>
Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
14 years agoAdded a nmake makefile for openvpnserv.exe building
Samuli Seppänen [Fri, 11 Feb 2011 13:15:51 +0000 (15:15 +0200)] 
Added a nmake makefile for openvpnserv.exe building

This change adds a nmake makefile (service-win32/msvc.mak) which allows building
openvpnserv.exe using the new Python-based buildsystem.

Signed-off-by: Samuli Seppänen <samuli@openvpn.net>
Acked-by: James Yonan <james@openvpn.net>
Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
14 years agoAdded ENABLE_PASSWORD_SAVE to config-win32.h
Samuli Seppänen [Fri, 11 Feb 2011 13:11:51 +0000 (15:11 +0200)] 
Added ENABLE_PASSWORD_SAVE to config-win32.h

This change adds ENABLE_PASSWORD_SAVE to config-win32.h. This option is also
defined in win/settings.in, but it does not have any effect there.

Signed-off-by: Samuli Seppänen <samuli@openvpn.net>
Acked-by: James Yonan <james@openvpn.net>
Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
14 years agoAdded "client-nat" option for stateless, one-to-one
James Yonan [Fri, 18 Feb 2011 17:48:25 +0000 (17:48 +0000)] 
Added "client-nat" option for stateless, one-to-one
NAT on the client side.

Version 2.1.3i.

git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@6944 e7ae566f-a301-0410-adde-c780ea21d3b5

14 years agoProperly handle certificate serial numbers > 32 bits.
James Yonan [Mon, 14 Feb 2011 22:03:44 +0000 (22:03 +0000)] 
Properly handle certificate serial numbers > 32 bits.

Version 2.1.3h

git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@6931 e7ae566f-a301-0410-adde-c780ea21d3b5

14 years agoFixes to r6925.
James Yonan [Mon, 14 Feb 2011 05:20:23 +0000 (05:20 +0000)] 
Fixes to r6925.

git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@6927 e7ae566f-a301-0410-adde-c780ea21d3b5