]> git.ipfire.org Git - thirdparty/openvpn.git/log
thirdparty/openvpn.git
14 years agoUpdate man page with info about --connect-timeout
Robert Fischer [Sun, 17 Apr 2011 21:25:34 +0000 (23:25 +0200)] 
Update man page with info about --connect-timeout

Signed-off-by: Robert Fischer <ml-openvpn@trispace.org>
Acked-by: David Sommerseth <dazo@users.sourceforge.net>
Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
14 years agoUpdate man page with info about --capath
Robert Fischer [Sun, 17 Apr 2011 21:03:49 +0000 (23:03 +0200)] 
Update man page with info about --capath

Signed-off-by: Robert Fischer <ml-openvpn@trispace.org>
Acked-by: David Sommerseth <dazo@users.sourceforge.net>
Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
14 years agoAdd a simple comment regarding openvpn_snprintf() is duplicated
David Sommerseth [Thu, 21 Apr 2011 19:03:25 +0000 (21:03 +0200)] 
Add a simple comment regarding openvpn_snprintf() is duplicated

Commit df5a4380c3931520d5fae2b18f0fc2e67a883aae copies this function
from buffer.c to service-win32/openvpnserv.c.  Any changes on either
places should be done in both implementations.

Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
14 years agoImprove the mysprintf() issue in openvpnserv.c
David Sommerseth [Thu, 21 Apr 2011 18:32:26 +0000 (20:32 +0200)] 
Improve the mysprintf() issue in openvpnserv.c

A quick and dirty compile fix was introduced in commit 77d244050964525417,
and was accepted under the condition that it would be a temporary fix.

As the usage of _snprintf() is realy not ideal on Windows, this patch
uses the same well tested openvpn_snprintf() function from buffer.c.
It was a longer discussion of several possibilities to re-use that code,
but in the end it seemed easier to just copy-paste this function to
openvpnserv.c for now.

The reason for this conclusion was that the function is really simple,
well defined and will most likely not be changed much in the future.
It is also added a comment in openvpnserv.c where this function
has its origins.

Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
Acked-by: James Yonan <james@openvpn.net>
14 years agoFixed a bug with GUI icon deletion on upgrade from 2.2-RC or earlier
Samuli Seppänen [Fri, 15 Apr 2011 13:25:17 +0000 (16:25 +0300)] 
Fixed a bug with GUI icon deletion on upgrade from 2.2-RC or earlier

This bug was introduced in commit 110e42d199e735ab1a31388c5678f59d0fa9510c.

Trac-ticket: 120
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 agoAvoid re-defining uint32_t when using mingw compiler
Gisle Vanem [Sat, 9 Apr 2011 12:56:52 +0000 (12:56 +0000)] 
Avoid re-defining uint32_t when using mingw compiler

Since MingW for quite a long time (since 3.2 in 2008?) has defined
'uint32_t' etc. in it's <stdint.h>, we need to guard against defining
them again. Ideally we should figure out in what version of MingW
this happened. But for now:

Signed-off-by: Gisle Vanem <gvanem@broadpark.no>
Acked-by: David Sommerseth <dazo@users.sourceforge.net>
Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
14 years agoAdded man page entry for --management-client
rf [Fri, 8 Apr 2011 18:49:49 +0000 (20:49 +0200)] 
Added man page entry for --management-client

Track-ticket: 114
Signed-off-by: rf <ml-openvpn@trispace.org>
Acked-by: David Sommerseth <dazo@users.sourceforge.net>
Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
14 years agoUpdate man page with info about --remote-random-hostname
rf [Fri, 8 Apr 2011 20:15:23 +0000 (13:15 -0700)] 
Update man page with info about --remote-random-hostname

Trac-ticket: 115
Signed-off-by: rf <ml-openvpn@trispace.org>
Acked-by: David Sommerseth <dazo@users.sourceforge.net>
Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
14 years agoFixed copying of tapinstall.exe to dist/bin when using prebuilt TAP-drivers
Samuli Seppänen [Thu, 14 Apr 2011 14:43:40 +0000 (17:43 +0300)] 
Fixed copying of tapinstall.exe to dist/bin when using prebuilt TAP-drivers

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 agoRemoved Win2k from supported platforms list in INSTALL and win/openvpn.nsi
Samuli Seppänen [Thu, 14 Apr 2011 14:41:23 +0000 (17:41 +0300)] 
Removed Win2k from supported platforms list in INSTALL and win/openvpn.nsi

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 agoFix a bug in devcon source code handling
Samuli Seppänen [Thu, 14 Apr 2011 14:40:33 +0000 (17:40 +0300)] 
Fix a bug in devcon source code handling

The win/config_ti.py build script assumes to find ../tapinstall/7600/sources.in
which does not exists in devcon.exe source code directory. This makes
config_ti.py look for ../tapinstall/7600/sources instead.

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 agoChange the default --tmp-dir path to a more suitable path
David Sommerseth [Thu, 14 Apr 2011 14:21:16 +0000 (16:21 +0200)] 
Change the default --tmp-dir path to a more suitable path

In commit 4e1cc5f6dda22e9 the create_temp_filename() function was
reviewed and hardened, which in the end renamed this function to
create_temp_file() in commit 495e3cec5d156.

With these changes it became more evident that OpenVPN needs a directory
where it can create temporary files.  The create_temp_file() will create
such files f.ex. if --client-connect or --plugin which makes use of
the OPENVPN_PLUGIN_AUTH_USER_PASS_VERIFY hook, such as openvpn-auth-pam.so.

When this happens, OpenVPN will normally create these files in the directory
OpenVPN was started.  In many cases, this will fail due to restricted access.
By using --tmp-dir and pointing it to a directory writeable to the user
running OpenVPN, it works again.

This patch makes OpenVPN use a more suitable temproary directory by default,
instead of the current working directory.  On non-Windows platforms this
default value is set to '/tmp', but can be modified at compile-time by
running ./configure --with-tmp-dir-path=<TEMP DIR PATH>.  On Windows, it
will use GetTempPath() to find temporary paths recommended by the OS.  If
this fails, it will fallback to the old behaviour, using the directory
where OpenVPN was started.

In any cases, this default value can be overridden in the configuration
file by using the --tmp-dir option, as before.

To check what the default is at runime, you can see this easily by doing
this:

      $ ./openvpn --verb 4 --dev tun | grep tmp_dir

Signed-off-by: David Sommerseth <davids@redhat.com>
Tested-by: Jan Just Keijser <janjust@nikhef.nl>
Acked-by: Gert Doering <gert@greenie.muc.de>
14 years agoFixed bug in port-share that could cause port share process to crash
James Yonan [Sun, 3 Apr 2011 21:48:15 +0000 (23:48 +0200)] 
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

14 years agoAdd more detailed explanation regarding the function of "--rdns-internal"
Gert Doering [Sat, 9 Apr 2011 16:16:21 +0000 (18:16 +0200)] 
Add more detailed explanation regarding the function of "--rdns-internal"

As agreed in last thursday's IRC meeting [1], I've added a comment to the
code explaining "--rdns-internal".  It's really very much an internal
option, so it does not need to go to the man page.

[1] http://thread.gmane.org/gmane.network.openvpn.devel/4573

Signed-off-by: Gert Doering <gert@greenie.muc.de>
Acked-by: David Sommerseth <davids@redhat.com>
Signed-off-by: David Sommerseth <davids@redhat.com>
14 years agoChange all CRLF linefeeds to LF linefeeds
Samuli Seppänen [Thu, 14 Apr 2011 14:18:47 +0000 (17:18 +0300)] 
Change all CRLF linefeeds to LF linefeeds

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 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 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 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 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 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 agoFix compiler warning when compiling against OpenSSL 1.0.0
David Sommerseth [Thu, 6 Jan 2011 18:31:34 +0000 (19:31 +0100)] 
Fix compiler warning when compiling against OpenSSL 1.0.0

The declaration of  SSL_get_current_cipher() has changed to be
return a const value.  And this makes compilers a little bit grumpy.

gcc:
  ssl.c: In function ‘print_details’:
  ssl.c:1918: warning: assignment discards qualifiers from pointer target type

Visual C:
  ssl.c (1918): warning C4019: '=' : different 'const' qualifiers

Signed-off-by: David Sommerseth <davids@redhat.com>
Acked-by: Gert Doering <gert@greenie.muc.de>
(cherry picked from commit 7bd3cea4c2f2aa8ed1bf548a3233ae2c3619d47d)

14 years agoMinor addition of logging info before and after
James Yonan [Fri, 10 Dec 2010 21:17:36 +0000 (21:17 +0000)] 
Minor addition of logging info before and after
execution of Windows net commands.

Version 2.1.3d

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

Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
(cherry picked from commit 7621741b480f93411928c66735d2ee9c7f69de3b)

14 years agoMake the --x509-username-field feature an opt-in feature
David Sommerseth [Wed, 15 Dec 2010 09:53:04 +0000 (10:53 +0100)] 
Make the --x509-username-field feature an opt-in feature

After some discussion [1] regarding an extension of this feature,
James Yonan wanted this extension to be an opt-in feature.  However,
as it does not make sense to opt-in on a extension of a feature which
was discussed, this patch makes the base feature an opt-in instead.

The base feature comes from commit 2e8337de248ef0b5b48cbb2964 (beta2.2)
and commit 935c62be9c0c8a256112 (feat_misc).

[1] http://thread.gmane.org/gmane.network.openvpn.devel/4266

Signed-off-by: David Sommerseth <davids@redhat.com>
Acked-by: James Yonan <james@openvpn.net>
(cherry picked from commit 024972e2ced84c6e5cabc43620ab510e5693d1d4)

14 years agoChange variadic macros to C99 style.
Matthias Andree [Sat, 4 Dec 2010 02:51:11 +0000 (03:51 +0100)] 
Change variadic macros to C99 style.

The macros used GCC's pre-C99 syntax, which could not be compiled with
Microsoft Visual Studio 2008.

Note this breaks compatibility with GCC versions before 3.0, which is
deemed safe in a discussion on IRC with David Sommerseth and Samuli
Seppänen on #openvpn-devel (RHEL 3 uses GCC 3.2 already).

Compiled tested on VS2008 by Samuli, on Cygwin GCC 3.4 and GCC 4.3 by myself.

Signed-off-by: Matthias Andree <matthias.andree@gmx.de>
Acked-by: David Sommerseth <dazo@users.sourceforge.net>
Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
(cherry picked from commit 9469168e3abb09bd78297208a917ee4d9c025041)

14 years agoPrepared v2.2-beta5 for release v2.2-beta5
David Sommerseth [Thu, 25 Nov 2010 20:45:26 +0000 (21:45 +0100)] 
Prepared v2.2-beta5 for release

Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
14 years agoMerge branch 'feat_misc' into beta2.2
David Sommerseth [Thu, 25 Nov 2010 20:28:10 +0000 (21:28 +0100)] 
Merge branch 'feat_misc' into beta2.2

14 years agoFixed an issue causing a build failure with MS Visual Studio 2008.
Samuli Seppänen [Thu, 25 Nov 2010 19:48:34 +0000 (21:48 +0200)] 
Fixed an issue causing a build failure with MS Visual Studio 2008.

The new SOCKS auth code in socks.c contained a call to sprintf instead of
openvpn_sprintf. This caused build to fail if MS Visual Studio 2008 C compiler
was used. This change fixes that issue.

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 agoPrepared for v2.2-beta4 for release v2.2-beta4
David Sommerseth [Sun, 21 Nov 2010 15:04:54 +0000 (16:04 +0100)] 
Prepared for v2.2-beta4 for release

Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
14 years agoUpdated ChangeLog with info about last merges
David Sommerseth [Thu, 18 Nov 2010 21:33:47 +0000 (22:33 +0100)] 
Updated ChangeLog with info about last merges

Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
14 years agoMerge branch 'feat_misc' into beta2.2
David Sommerseth [Thu, 18 Nov 2010 21:17:58 +0000 (22:17 +0100)] 
Merge branch 'feat_misc' into beta2.2

Conflicts:
acinclude.m4
config-win32.h
configure.ac
misc.c
thread.c
thread.h
        - These conflicts was mainly due to feat_misc getting old
          and mostly caused by the pthread clean-up patches in
          feat_misc

Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
14 years agoMerge branch 'bugfix2.1' into beta2.2
David Sommerseth [Thu, 18 Nov 2010 18:10:08 +0000 (19:10 +0100)] 
Merge branch 'bugfix2.1' into beta2.2

14 years agoAdded command-line option parser and an unsigned build option to build_all.py
Samuli Seppänen [Thu, 18 Nov 2010 16:00:54 +0000 (18:00 +0200)] 
Added command-line option parser and an unsigned build option to build_all.py

Modified win/build_all.py so that it parses command-line options using getopt.
Added option "-u / --unsigned" which allows forcing unsigned builds and a "-h /
--help" option. By default a signed build is generated, provided that the Python
SignTool module is installed. If not, the build is interrupted.

Signed-off-by: Samuli Seppänen <samuli@openvpn.net>
Acked-by: Peter Stuge <peter@stuge.se>
Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
14 years agoMerged add_bypass_address() and add_host_route_if_nonlocal()
David Sommerseth [Mon, 15 Nov 2010 08:00:12 +0000 (09:00 +0100)] 
Merged add_bypass_address() and add_host_route_if_nonlocal()

The add_host_route_if_nonlocal() function is too simple to really
benefit from calling add_bypass_address() when this function is the
only caller to this function.

Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
Acked-by: Peter Stuge <peter@stuge.se>
14 years agoRemoved functions not being used anywhere
David Sommerseth [Mon, 15 Nov 2010 07:58:36 +0000 (08:58 +0100)] 
Removed functions not being used anywhere

The GNU C compiler gave warnings about these functions in the patch
not being used anywhere.  Doing a git grep on the code turned out
there were no callers to these functions.  Taking these functions out,
as there is not good reason why to carry dead code.

Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
Acked-by: Peter Stuge <peter@stuge.se>
14 years agoOnly add some functions when really needed
David Sommerseth [Mon, 15 Nov 2010 07:56:18 +0000 (08:56 +0100)] 
Only add some functions when really needed

The GNU C compiler gave warnings about some functions not being used.
These functions where only used if certian #ifdef sections was enabled.

This patch encapsulates these function declarations with matching #ifdef's
to make it more clear when these functions are needed.

Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
Acked-by: Peter Stuge <peter@stuge.se>
14 years agoFixed potential misinterpretation of boolean logic
David Sommerseth [Mon, 15 Nov 2010 07:53:40 +0000 (08:53 +0100)] 
Fixed potential misinterpretation of boolean logic

The GNU C compiler warned about a potential issue with an if()
expression missing an extra set of parentheses.

Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
Acked-by: Peter Stuge <peter@stuge.se>
14 years agoFix compiler warnings about not used dummy() functions
David Sommerseth [Mon, 15 Nov 2010 07:48:57 +0000 (08:48 +0100)] 
Fix compiler warnings about not used dummy() functions

It has been reported that the Microsoft Visual C compiler complains if
a .c file do not contain any compilable code, which can happen if the
code has been #ifdef'ed out.  To avoid this, these #ifdef sections have
a #else section which adds a static dummy() function which does nothing.

On the other hand, the GNU C compiler complains about unused functions when
it discovers this situation.

This patch tries to only add these dummy() functions if the Microsoft Visual C
compiler is detected, via the _MSC_VER macro.

Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
Acked-by: Peter Stuge <peter@stuge.se>
14 years agoUse stricter snprintf() formatting in socks_username_password_auth() (v3)
David Sommerseth [Mon, 15 Nov 2010 20:44:59 +0000 (21:44 +0100)] 
Use stricter snprintf() formatting in socks_username_password_auth() (v3)

commit fc1fa9ffc7e3356458ec3 added a new function which needs to have a
stricter string formatting.  This was detected due to a compiler warning.

This patch makes sure that the length of username and password is not longer
than 255 bytes.  It also adds extra checks to avoid NULL pointer issues with
strlen() on these two parameters.

Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
Acked-by: Gert Doering <gert@greenie.muc.de>
14 years agoMerge branch 'svn-BETA21' into bugfix2.1
David Sommerseth [Thu, 18 Nov 2010 17:47:06 +0000 (18:47 +0100)] 
Merge branch 'svn-BETA21' into bugfix2.1

14 years agoFixes to prevent compile breakage when --disable-crypto is used.
James Yonan [Tue, 16 Nov 2010 09:10:39 +0000 (09:10 +0000)] 
Fixes to prevent compile breakage when --disable-crypto is used.

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

14 years agoIn verify_callback, the subject var should be freed by OPENSSL_free,
James Yonan [Tue, 16 Nov 2010 08:36:18 +0000 (08:36 +0000)] 
In verify_callback, the subject var should be freed by OPENSSL_free,
not free, since it is allocated by OpenSSL.

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

14 years agoMerge branch 'bugfix2.1' into beta2.2
David Sommerseth [Sun, 14 Nov 2010 22:48:49 +0000 (23:48 +0100)] 
Merge branch 'bugfix2.1' into beta2.2

Conflicts:
options.c
- Disagreements about a new included file (forward.h)

Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
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 agoRemove hardcoded path to resolvconf
Jesse Young [Mon, 1 Nov 2010 16:33:26 +0000 (11:33 -0500)] 
Remove hardcoded path to resolvconf

Signed-off-by: Jesse Young <jesse.young@gmail.com>
Acked-by: David Sommerseth <dazo@users.sourceforge.net>
Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
14 years agoClean-up: Removing useless code - hash related functions
David Sommerseth [Sat, 28 Aug 2010 18:52:19 +0000 (20:52 +0200)] 
Clean-up: Removing useless code - hash related functions

Removed even more function which where practically empty and took away
some function arguments which were not used.

Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
Acked-by: James Yonan <james@openvpn.net>
14 years agoClean-up: Remove more dead and inactive code paths
David Sommerseth [Sat, 28 Aug 2010 18:44:07 +0000 (20:44 +0200)] 
Clean-up: Remove more dead and inactive code paths

These code paths was practically not needed with no locking mechanisms
enabled and was just bloating the source code.

Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
Acked-by: James Yonan <james@openvpn.net>
14 years agoClean-up: Remove pthread and mutex locking code
David Sommerseth [Sat, 28 Aug 2010 18:14:36 +0000 (20:14 +0200)] 
Clean-up: Remove pthread and mutex locking code

This code was not activated at all, and hard coded as disabled in syshead.h
with this code snippet:

   /*
    * Pthread support is currently experimental (and quite unfinished).
    */
   #if 1 /* JYFIXME -- if defined, disable pthread */
   #undef USE_PTHREAD
   #endif

So no matter if --enable-pthread when running ./configure or not, this feature
was never enabled in reality.  Further, by removing the blocker code above made
OpenVPN uncompilable in the current state.

As the threading part needs to be completely rewritten and pthreading will not be
supported in OpenVPN 2.x, removing this code seems most reasonable.

In addition, a lot of mutex locking code was also removed, as they were practically
NOP functions, due to pthreading being forcefully disabled

Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
Acked-by: James Yonan <james@openvpn.net>
14 years agoMerge branch 'feat_misc' into beta2.2
David Sommerseth [Sun, 14 Nov 2010 11:42:38 +0000 (12:42 +0100)] 
Merge branch 'feat_misc' into beta2.2

14 years agoAdded check for variable CONFIGURE_DEFINES into options.c
Samuli Seppänen [Fri, 12 Nov 2010 15:30:07 +0000 (17:30 +0200)] 
Added check for variable CONFIGURE_DEFINES into options.c

The file containing CONFIGURE_DEFINES variable, configure.h, is not present if
openvpn is built using the Python + Visual C -based buildsystem. This causes the
build to fail. This patch adds a check to see if variable exists before trying
to use it.

Signed-off-by: Samuli Seppänen <samuli@openvpn.net>
Acked-by: Peter Stuge <peter@stuge.se>
Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
14 years agoMerge branch 'feat_misc' into beta2.2
David Sommerseth [Fri, 12 Nov 2010 23:55:02 +0000 (00:55 +0100)] 
Merge branch 'feat_misc' into beta2.2

Conflicts:
Makefile.am
openvpn.8
options.c
socket.c
ssl.c
- feat_misc is missing a lot of bugfix2.1 changes

Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
14 years agoMerge branch 'bugfix2.1' into beta2.2
David Sommerseth [Fri, 12 Nov 2010 23:49:05 +0000 (00:49 +0100)] 
Merge branch 'bugfix2.1' into beta2.2

14 years agoMerge branch 'svn-BETA21' into beta2.2
David Sommerseth [Fri, 12 Nov 2010 23:48:28 +0000 (00:48 +0100)] 
Merge branch 'svn-BETA21' into beta2.2

Conflicts:
version.m4
- Reset version.m4 to a more neutral version number

Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
14 years agoMerge branch 'svn-BETA21' into bugfix2.1
David Sommerseth [Fri, 12 Nov 2010 23:46:13 +0000 (00:46 +0100)] 
Merge branch 'svn-BETA21' into bugfix2.1

14 years agoClarified --explicit-exit-notify man page entry
David Sommerseth [Fri, 12 Nov 2010 22:10:32 +0000 (23:10 +0100)] 
Clarified --explicit-exit-notify man page entry

Reformulated parts of this entry to clarify that the OpenVPN
will not attempt notifying the server unless this option is used.

This misunderstanding was reported anonymously to the old SF.net
tracker.

Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
Trac-ticket: 40

14 years agoImproved man page entry for script_type
Gert Doering [Thu, 21 Oct 2010 11:13:21 +0000 (13:13 +0200)] 
Improved man page entry for script_type

Signed-off-by: Gert Doering <gert@greenie.muc.de>
Acked-by: krzee <jeff@doeshosting.com>
Acked-by: David Sommerseth <dazo@users.sourceforge.net>
Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
14 years agoAdd HTTP/1.1 Host header
Lars Hupel [Thu, 30 Sep 2010 00:27:36 +0000 (01:27 +0100)] 
Add HTTP/1.1 Host header

OpenVPN should send a Host: header to comply with the HTTP/1.1
specification.

Full discussion of this patch can be found here:
<http://thread.gmane.org/gmane.network.openvpn.devel/4039>

Signed-off-by: Lars Hupel <hupel@in.tum.de>
Acked-by: Peter Stuge <peter@stuge.se>
Acked-by: Gert Doering <gert@greenie.muc.de>
Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
Trac-ticket: 63

14 years agoMake "topology subnet" work on Solaris (ifconfig + route metric changes by Kazuyoshi...
Gert Doering [Sat, 30 Oct 2010 19:03:16 +0000 (21:03 +0200)] 
Make "topology subnet" work on Solaris (ifconfig + route metric changes by Kazuyoshi Aizawa, adding of local "connected subnet" route by me)

Tested on OpenSolaris/i386, no impact for other TARGETs.

Signed-off-by: Gert Doering <gert@greenie.muc.de>
Acked-by: Kazuyoshi Aizawa <admin2@whiteboard.ne.jp>
Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
14 years agoIntegrate support for TAP mode on Solaris, written by Kazuyoshi Aizawa <admin2@whiteb...
Gert Doering [Fri, 29 Oct 2010 15:41:53 +0000 (17:41 +0200)] 
Integrate support for TAP mode on Solaris, written by Kazuyoshi Aizawa <admin2@whiteboard.ne.jp>.

See also http://www.whiteboard.ne.jp/~admin2/tuntap/

Signed-off-by: Gert Doering <gert@greenie.muc.de>
Acked-by: Kazuyoshi Aizawa <admin2@whiteboard.ne.jp>
Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
14 years agoAdding support for SOCKS plain text authentication
Pierre Bourdon [Sun, 10 Oct 2010 22:56:04 +0000 (00:56 +0200)] 
Adding support for SOCKS plain text authentication

This patch adds support for SOCKS plain text (username/password)
authentication as described in RFC 1929. It adds an optional third
parameter to the socks-proxy option, which is a file containing the
login credentials.

I've been using this patch for two weeks now and it does not seem to
cause any problem. The only modifications are in the SOCKS handshake
handling and the options parser.

Signed-Off-By: Pierre Bourdon <delroth@gmail.com>
Acked-by: Gert Doering <gert@greenie.muc.de>
Acked-by: David Sommerseth <dazo@users.sourceforge.net>
Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>