summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Preparing for the v2.2-RC2 releasev2.2-RC2David Sommerseth2011-03-242-2/+24
| | | | Signed-off-by: David Sommerseth <davids@redhat.com>
* Windows cross-compile cleanupAlon Bar-Lev2011-03-244-26/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Clarified --client-config-dir section on the man-page.Samuli Seppänen2011-03-241-1/+3
| | | | | | Signed-off-by: Samuli Seppänen <samuli@openvpn.net> Acked-by: David Sommerseth <davids@redhat.com> Signed-off-by: David Sommerseth <davids@redhat.com>
* Clarify default value for the --inactive option.David Sommerseth2011-03-241-1/+1
| | | | | | | | 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>
* Open log files as text files on WindowsDavid Sommerseth2011-03-241-1/+1
| | | | | | | | | | | | | | | | 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>
* Fixes to Makefile.amSamuli Seppänen2011-03-231-2/+2
| | | | | | | | | 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>
* Updated INSTALL-win32.txtSamuli Seppänen2011-03-211-11/+12
| | | | | | 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>
* Replaced config-win32.h with win/config.h.inSamuli Seppänen2011-03-218-358/+372
| | | | | | | | | | | | | | | | | 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>
* Fixes to win/openvpn.nsiSamuli Seppänen2011-03-211-2/+17
| | | | | | | | | 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>
* Added support for prebuilt TAP-drivers. Automated embedding manifests.Samuli Seppänen2011-03-216-79/+111
| | | | | | | | | | | 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>
* Implement IPv6 in TUN mode for Windows TAP driver.Gert Doering2011-03-103-4/+254
| | | | | | | | | | | | | | | | | | * 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>
* Fix line continuation in chkconfig init script description.Ville Skyttä2011-03-011-4/+4
| | | | | | | | 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>
* Fix packaging of config-win32.h and service-win32/msvc.makv2.2-RCDavid Sommerseth2011-02-282-3/+6
| | | | | | | | | 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>
* Preparing for the OpenVPN 2.2-RC releaseDavid Sommerseth2011-02-282-2/+30
| | | | Signed-off-by: David Sommerseth <davids@redhat.com>
* Temporary snprintf-related fix to service-win32/openvpnserv.cSamuli Seppänen2011-02-281-2/+1
| | | | | | | | | | | | | | | 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>
* Changes to buildsystem patchsetSamuli Seppänen2011-02-274-26/+34
| | | | | | | | | | | | | | | 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>
* Added first version of NSI installer script to win/openvpn.nsiSamuli Seppänen2011-02-271-0/+802
| | | | | | | | | | | | | | | | | | 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>
* Copied install-win32/setpath.nsi to win/setpath.nsiSamuli Seppänen2011-02-271-0/+231
| | | | | | 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>
* Several modifications to win/make_dist.py to allow building the NSI installerSamuli Seppänen2011-02-271-3/+25
| | | | | | | | | | | | | | 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>
* Added comments to win/build_ddk.pySamuli Seppänen2011-02-271-0/+1
| | | | | | 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>
* Added openvpnserv.exe building to win/build.pySamuli Seppänen2011-02-271-1/+8
| | | | | | | | | 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>
* Added configure.h and version.m4 variable parsing to win/config.pySamuli Seppänen2011-02-271-1/+3
| | | | | | | | | | 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>
* Added command-line switch to win/build_all.py to skip TAP driver buildingSamuli Seppänen2011-02-271-7/+16
| | | | | | | | | | 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>
* Added comments and made small modifications to win/msvc.mak.inSamuli Seppänen2011-02-271-16/+16
| | | | | | | | | | 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>
* Added support for viewing config-win32.h paramters to win/show.pySamuli Seppänen2011-02-271-3/+3
| | | | | | | | | | 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>
* Added helper functionality to win/wb.pySamuli Seppänen2011-02-271-0/+99
| | | | | | | | | | | | | | | | | 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>
* Moved TAP-driver version info to version.m4. Cleaned up win/settings.in.Samuli Seppänen2011-02-272-17/+13
| | | | | | | | | | 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>
* Added a nmake makefile for openvpnserv.exe buildingSamuli Seppänen2011-02-271-0/+30
| | | | | | | | | 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>
* Added ENABLE_PASSWORD_SAVE to config-win32.hSamuli Seppänen2011-02-271-0/+3
| | | | | | | | | 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>
* Fix compiler warning when compiling against OpenSSL 1.0.0David Sommerseth2011-01-061-1/+1
| | | | | | | | | | | | | | | | 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)
* Minor addition of logging info before and afterJames Yonan2010-12-201-0/+2
| | | | | | | | | | | 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)
* Make the --x509-username-field feature an opt-in featureDavid Sommerseth2010-12-174-0/+23
| | | | | | | | | | | | | | | | 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)
* Change variadic macros to C99 style.Matthias Andree2010-12-041-4/+4
| | | | | | | | | | | | | | | | 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)
* Prepared v2.2-beta5 for releasev2.2-beta5David Sommerseth2010-11-252-1/+6
| | | | Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
* Merge branch 'feat_misc' into beta2.2David Sommerseth2010-11-251-1/+1
|\
| * Fixed an issue causing a build failure with MS Visual Studio 2008.Samuli Seppänen2010-11-251-1/+1
| | | | | | | | | | | | | | | | | | | | 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>
* | Prepared for v2.2-beta4 for releasev2.2-beta4David Sommerseth2010-11-212-2/+2
| | | | | | | | Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
* | Updated ChangeLog with info about last mergesDavid Sommerseth2010-11-181-0/+39
| | | | | | | | Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
* | Merge branch 'feat_misc' into beta2.2David Sommerseth2010-11-1846-1064/+60
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * Merged add_bypass_address() and add_host_route_if_nonlocal()David Sommerseth2010-11-181-22/+12
| | | | | | | | | | | | | | | | | | 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>
| * Removed functions not being used anywhereDavid Sommerseth2010-11-182-21/+0
| | | | | | | | | | | | | | | | | | | | 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>
| * Only add some functions when really neededDavid Sommerseth2010-11-182-0/+4
| | | | | | | | | | | | | | | | | | | | | | 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>
| * Fixed potential misinterpretation of boolean logicDavid Sommerseth2010-11-181-1/+1
| | | | | | | | | | | | | | | | 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>
| * Fix compiler warnings about not used dummy() functionsDavid Sommerseth2010-11-184-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * Use stricter snprintf() formatting in socks_username_password_auth() (v3)David Sommerseth2010-11-181-3/+10
| | | | | | | | | | | | | | | | | | | | | | | | 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>
| * Clean-up: Removing useless code - hash related functionsDavid Sommerseth2010-11-146-49/+20
| | | | | | | | | | | | | | | | 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>
| * Clean-up: Remove more dead and inactive code pathsDavid Sommerseth2010-11-1411-52/+5
| | | | | | | | | | | | | | | | 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>
| * Clean-up: Remove pthread and mutex locking codeDavid Sommerseth2010-11-1432-921/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Merge branch 'bugfix2.1' into beta2.2David Sommerseth2010-11-182-17/+58
|\ \
| * | Added command-line option parser and an unsigned build option to build_all.pySamuli Seppänen2010-11-181-15/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>