0
0
mirror of https://github.com/OpenVPN/openvpn.git synced 2024-09-20 12:02:28 +02:00
Commit Graph

761 Commits

Author SHA1 Message Date
Samuli Seppänen
b7e0d372e3 Fixes to easy-rsa/2.0
As support for OpenSSL 1.0.0 requires a modified openssl.cnf file, it was
decided to rename openssl.cnf to openssl-1.0.0.cnf for clarity and better
support of different OpenSSL versions. The old openssl.cnf was renamed as
openssl-0.9.8.cnf.

This patch makes sure that all openssl*.cnf files are copied when running 'make
install' in easy-rsa and makes the whichopensslcnf script aware of them as well.

Signed-off-by: Samuli Seppänen <samuli@openvpn.net>
Acked-by: David Sommerseth <davids@redhat.com>
Signed-off-by: David Sommerseth <davids@redhat.com>
2011-07-01 11:35:43 +02:00
Samuli Seppänen
d22a3799f5 Made domake-win builds to use easy-rsa/2.0/openssl-1.0.0.cnf
Signed-off-by: Samuli Seppänen <samuli@openvpn.net>
Acked-by: David Sommerseth <davids@redhat.com>
Signed-off-by: David Sommerseth <davids@redhat.com>
2011-07-01 11:35:43 +02:00
Samuli Seppänen
acef89fc94 Updated "easy-rsa" for OpenSSL 1.0.0
This patch fixes remaining issues with Trac ticket #125. It does the following:

- Update easy-rsa/2.0/README
- Rename easy-rsa/2.0/openssl.cnf as openssl-0.9.8.cnf
- Add easy-rsa/2.0/openssl-1.0.0.cnf
- Updated vars.bat.sample to use openssl-1.0.0.cnf
- Updated win/openvpn.nsi to use openssl-1.0.0.cnf
- Add a few undefined variables to vars and vars.bat.sample:
  required by OpenSSL 1.0.0 (at least on Windows)

Signed-off-by: Samuli Seppänen <samuli@openvpn.net>
Tested-by: Samuli Seppänen <samuli@openvpn.net>
Acked-by: David Sommerseth <davids@redhat.com>
Signed-off-by: David Sommerseth <davids@redhat.com>
2011-07-01 11:35:43 +02:00
David Sommerseth
54c739eae0 Revert "Add new openssl.cnf to easy-rsa/Windows"
This reverts commit 663860ad04.

Accoding to Jan Just Keijser [1] there are issues with this new
openssl.cnf file, so reverting this commit and wait for a new patch.

[1] http://thread.gmane.org/gmane.network.openvpn.devel/4729/focus=4735
2011-06-20 11:47:14 +02:00
Samuli Seppänen
663860ad04 Add new openssl.cnf to easy-rsa/Windows
This is required for patch "Fix a build-ca issue on Windows" to work

Signed-off-by: Samuli Seppänen <samuli@openvpn.net>
Acked-by: David Sommerseth <davids@redhat.com>
2011-06-20 11:02:36 +02:00
Samuli Seppänen
38108434db Fix a build-ca issue on Windows
Fixes Trac ticket #125

Signed-off-by: Samuli Seppänen <samuli@openvpn.net>
Acked-by: David Sommerseth <davids@redhat.com>
Signed-off-by: David Sommerseth <davids@redhat.com>
2011-06-20 11:01:04 +02:00
David Sommerseth
ce637abdaf Remove support for Linux 2.2 configuration fallback
When configuring OpenVPN nowadays, the TUN/TAP configuration can
sometimes jump into the Linux 2.2 fallback code paths, which will
also fails.  The reason it jumps into fallback mode is that the
tun/tap device already exists or that /dev/net/tun does not exist.
This can be very confusing, as /dev/tunX which the fallback mode tries
to use, does not exist on Linux 2.4 and newer.

Considering that the last Linux 2.2 update was released 25-Feb-2004
and the first Linux 2.4 release came 04-Jan-2001, there are no
reasonable reasons to help users to stay on outdated kernels.
I consider this extra code path just waste of bytes ... so lets make
the world simpler.

Signed-off-by: David Sommerseth <davids@redhat.com>
Acked-by: Gert Doering <gert@greenie.muc.de>
2011-06-15 11:49:01 +02:00
Robert Fischer
ca8af756c5 Documented --x509-username-field option
Also fixed a typo in the --help screen.

Signed-off-by: Robert Fischer <ml-openvpn@trispace.org>
Acked-by: David Sommerseth <davids@redhat.com>
Signed-off-by: David Sommerseth <davids@redhat.com>
2011-06-14 11:14:03 +02:00
Robert Fischer
54d40afdfa Added info about --show-proxy-settings
Signed-off-by: Robert Fischer <ml-openvpn@trispace.org>
Acked-by: David Sommerseth <davids@redhat.com>
Signed-off-by: David Sommerseth <davids@redhat.com>
2011-06-14 11:05:36 +02:00
David Sommerseth
efcdf594f8 Fix compiling issues with pkcs11 when --disable-management is configured
pkcs11.c seems to miss some header files which gets implicitly added when
the management interface is enabled.

Signed-off-by: David Sommerseth <davids@redhat.com>
Tested-by: Mr Dash Four <mr.dash.four@googlemail.com>
2011-05-31 23:44:35 +02:00
David Sommerseth
21fc2edfc4 Don't define ENABLE_PUSH_PEER_INFO if SSL is not available
The push_peer_info feature depends on the SSL infrastructure and openvpn
will fail to build if ./configure --disable-crypto --disable-ssl is
used.  The solution is to not define ENABLE_PUSH_PEER_INFO if we don't
have crypto/ssl.

Signed-off-by: David Sommerseth <davids@redhat.com>
Acked-by: Gert Doering <gert@greenie.muc.de>
2011-05-27 11:43:03 +02:00
David Sommerseth
8a606673bd Merge remote-tracking branch 'cron2/feat_ipv6_payload_2.3'
Conflicts:
	options.c
	- version string for IPv6 payload changed

Signed-off-by: David Sommerseth <davids@redhat.com>
2011-05-23 12:16:49 +02:00
Gert Doering
b55e49bd69 Windows IPv6 cleanup - properly remove IPv6 routes and interface config
after tunnel shutdown.  Needs to make delete_route_ipv6() visible from
tun.c (route.c, route.h) and to properly zero-out host bits from IPv6
"network" at interface route clearing.  Further, add IPv6 routes with
"store=active" to make sure nothing lingers after a system crash while
OpenVPN was running.

While at it, small Solaris cleanup - use CLEAR() to zero-out "ifr" struct.

Tested on Windows XP SP3 and Win7 by Gert Doering and Tony Lim.

Signed-off-by: Gert Doering <gert@greenie.muc.de>
2011-05-22 19:08:22 +02:00
David Sommerseth
555fc5e34a Fix const declarations in plug-in v3 structs
Microsoft Visual Studio complains about const char const **ptr declarations
and expects them to be be const char ** const ptr.  The latter is what was the
intention, that neither the pointer nor the value(s) it points at can be changed.

Signed-off-by: David Sommerseth <davids@redhat.com>
Acked-by: Gert Doering <gert@greenie.muc.de>
2011-05-19 20:27:03 +02:00
smos
39990a2b83 Change the netsh.exe command from "add" to "set".
This prevents the netsh.exe command from exiting with a status 1
when the address already exists. By adding store=active the address
will not survive a reboot and be assigned temporarily.

Tested on Windows 7 and Windows XP SP 2.

Signed-off-by: smos <seth.mos@dds.nl>
Acked-by: Gert Doering <gert@greenie.muc.de>
Signed-off-by: Gert Doering <gert@greenie.muc.de>
2011-05-19 19:46:09 +02:00
Matthew L. Creech
ca0ed8458a Fix 2.2.0 build failure when management interface disabled
I just upgraded to 2.2.0, and my build fails with:

ps.c: In function 'port_share_open':
ps.c:778:7: error: 'management' undeclared (first use in this function)
ps.c:778:7: note: each undeclared identifier is reported only once for
each function it appears in
make[5]: *** [ps.o] Error 1

[Comment by David Sommerseth:
 This happens only when building with --enable-small, --disable-management
 and --disable-pkcs11

 Also changed MANAGEMENT_ENABLED to ENABLE_MANAGEMENT from the original
 patch.
]

Mailing-list: http://thread.gmane.org/gmane.network.openvpn.devel/4639
Signed-off-by: Matthew L. Creech <mlcreech@gmail.com>
Acked-by: Gert Doering <gert@greenie.muc.de>
Signed-off-by: David Sommerseth <davids@redhat.com>
2011-05-19 18:21:24 +02:00
Simon Matter
aa52ca828f Fix issues with some older GCC compilers
Some older GCC compilers don't like that variables are declared
in the middle of the code, and expect them on the top in the
block/scope.

Trac-ticket: 99
Signed-off-by: Simon Matter <simon.matter@invoca.ch>
Acked-by: David Sommerseth <davids@redhat.com>
Signed-off-by: David Sommerseth <davids@redhat.com>
2011-05-10 10:51:18 +02:00
Gustavo Zacarias
b70d99fb61 Fix compile issues when using --enable-small and --disable-ssl/--disable-crypto
The tmp_dir string is required in the options struct regardless of options
so spin it out of #if conditionals.

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Acked-by: David Sommerseth <dazo@users.sourceforge.net>
Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
2011-04-27 18:43:50 +02:00
David Sommerseth
0b6450c93f Solved hidden merge conflicts between master and svn-branch-2.1
ps.c - The feat_ipv6_transport patch set modifies struct openvpn_sockaddr by
       adding a union named 'addr' in commit 8335caf929.

ssl.c - A needed } and #endif had been dropped by a mistake

Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
2011-04-26 23:27:12 +02:00
David Sommerseth
20b18fd799 Merge branch 'svn-branch-2.1' into merge
Pulling in changes from James' 2.1/openvpn branch in SVN.

Conflicts:
	buffer.c
	init.c
	manage.h
	multi.c
	openvpn.8
	options.c
	ssl.c
	version.m4
	win/sign.py

Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
2011-04-26 23:04:18 +02:00
James Yonan
e4359af463 Fixed compile issues on Windows.
Version 2.1.3w


git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@7219 e7ae566f-a301-0410-adde-c780ea21d3b5
2011-04-26 22:29:12 +02:00
James Yonan
7966d75a9d Added new "extra-certs" and "verify-hash" options (see man page for
details).

Increase the timeout after SIGUSR1 restart when restart is not
due to server_poll_timeout.

Version 2.1.3v


git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@7215 e7ae566f-a301-0410-adde-c780ea21d3b5
2011-04-26 22:29:12 +02:00
James Yonan
d5497262ae Added 'dir' flag to "crl-verify" (see man page for info).
Don't call SSL_CTX_set_client_CA_list or SSL_CTX_set_client_CA_list
if not running in server mode (these functions are only useful for
TLS/SSL servers).

Modified openvpn_snprintf to return false on overflow, and true
otherwise.

When AUTH_FAILED,... is received, log the full string.


git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@7213 e7ae566f-a301-0410-adde-c780ea21d3b5
2011-04-26 22:29:12 +02:00
James Yonan
cf906790a8 Revert r7092 and r7151, i.e. remove --enable-osxipconfig
configure option.  ipconfig on Mac has certain behavior that makes
it unsuitable for use by OpenVPN to configure tun/tap interface.

Version 2.1.3u


git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@7191 e7ae566f-a301-0410-adde-c780ea21d3b5
2011-04-26 22:29:12 +02:00
James Yonan
cacae3c01c Version 2.1.3t
git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@7152 e7ae566f-a301-0410-adde-c780ea21d3b5
2011-04-26 22:29:12 +02:00
James Yonan
e51935df0e 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
2011-04-26 22:29:11 +02:00
James Yonan
28c8776b65 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
2011-04-26 22:29:11 +02:00
James Yonan
4d453a1792 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
2011-04-26 22:29:11 +02:00
James Yonan
ac1310528a 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
2011-04-26 22:29:11 +02:00
James Yonan
e9f8696f39 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
2011-04-26 22:29:11 +02:00
James Yonan
0db046f253 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
2011-04-26 22:29:11 +02:00
James Yonan
1f00199407 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
2011-04-26 22:29:11 +02:00
James Yonan
5d2e139852 Version 2.1.3n
git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@7069 e7ae566f-a301-0410-adde-c780ea21d3b5
2011-04-26 22:29:11 +02:00
James Yonan
4ff5b53ff8 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
2011-04-26 22:29:11 +02:00
James Yonan
e1b99e6b66 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
2011-04-26 22:29:11 +02:00
James Yonan
3530e5fba8 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
2011-04-26 22:29:11 +02:00
James Yonan
ff65da3a23 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
2011-04-26 22:29:11 +02:00
James Yonan
a74b741b61 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
2011-04-26 22:29:11 +02:00
James Yonan
9df9e13f7c Reduce log verbosity at level 3, with a focus on removing excessive log verbosity generated by port-share activity.
Version 2.1.3k

git-svn-id: http://svn.openvpn.net/projects/branches/BETA21@7033 e7ae566f-a301-0410-adde-c780ea21d3b5
2011-04-25 22:13:45 +02:00
James Yonan
1c5ff7722d Added optional journal directory argument to "port-share" directive, for reporting client IP origins of proxied connections.
git-svn-id: http://svn.openvpn.net/projects/branches/BETA21@7031 e7ae566f-a301-0410-adde-c780ea21d3b5
2011-04-25 22:13:22 +02:00
James Yonan
6c34e74f13 Added --enable-lzo-stub configure option to build an OpenVPN client without LZO, but that has limited interoperability with LZO-enabled servers.
Modified "push-peer-info" option to push IV_LZO_STUB=1 to server when
client was built with --enable-lzo-stub configure option.  This tells
the server that the client lacks LZO capabilities, so the server
should turn off LZO compression for this client via "lzo no".

Added "setenv PUSH_PEER_INFO" option having the same effect as
"push-peer-info".

Version 2.1.3j

git-svn-id: http://svn.openvpn.net/projects/branches/BETA21@7023 e7ae566f-a301-0410-adde-c780ea21d3b5
2011-04-25 22:12:03 +02:00
David Sommerseth
c5f7d08b8c Merge branch 'feat_ipv6_payload'
Conflicts:
	options.c
	- feat_ipv6_payload and feat_ip6_transport both updates
      this file with presence information

Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
2011-04-25 17:18:40 +02:00
David Sommerseth
dcf4bcc2d9 Merge branch 'feat_ipv6_transport' 2011-04-25 17:08:14 +02:00
Gert Doering
15a436aac6 rebased to 2.2RC2 (beta 2.2 branch)
removed mutex locking stuff (no more threading in 2.2)
fixed rebase/merge artifacts in mroute.c
add current ChangeLog.IPv6 and TODO.IPv6 to commit
tag as ipv6-20110424-2

Signed-off-by: Gert Doering <gert@greenie.muc.de>
2011-04-24 17:22:46 +02:00
Gert Doering
37aa6ac67b Implement "ipv6 ifconfig" for TAP interfaces on Solaris
Solaris close_tun(): add explicit "unplumb'ing" of IPv6 tun/tap
interfaces, otherwise they would linger around after OpenVPN exits.

Signed-off-by: Gert Doering <gert@greenie.muc.de>
2011-04-24 17:22:46 +02:00
Gert Doering
a64e083c77 bump IPv6 version number (openvpn --version) to 20100922-1
document Linux tun fixes and test results in ChangeLog.IPv6

Signed-off-by: Gert Doering <gert@greenie.muc.de>
2011-04-24 17:22:45 +02:00
Gert Doering
cfa5b2bf34 bugfix for linux/iproute2: IPv6 ifconfig code block was not called for
"dev tun"+"topology subnet" - moved code out of "if (tun)" block, works.

add more debug information to help diagnose cases where IPv6 isn't working
Signed-off-by: Gert Doering <gert@greenie.muc.de>
2011-04-24 17:22:45 +02:00
Gert Doering
7402980cd2 correct URL for "more information about IPv6 patch is *here*"
Signed-off-by: Gert Doering <gert@greenie.muc.de>
2011-04-24 17:22:44 +02:00
Gert Doering
48173b72c6 2.2-beta3 has a signed TAP driver with the IPv6 code, but it's not
version 9.7 as anticipated (that's 2.1.3) but 9.8 - change test to
require 9.8, and change message to point to 2.2-beta3 and up.

Signed-off-by: Gert Doering <gert@greenie.muc.de>
2011-04-24 17:22:44 +02:00
Gert Doering
670d1b57b6 renamed t_client.sh to t_client.sh.in
build t_client.sh by configure at run-time, with proper paths to
ip/ifconfig/netstat binaries, and (most important) with proper #!SHELL

extend configure.ac to find "netstat" binary and to chmod +x "t_client.sh"

Signed-off-by: Gert Doering <gert@greenie.muc.de>
2011-04-24 17:22:44 +02:00