Solaris questions
Hi, all
I've tried to build Solaris OpenVPN packages for various versions of solaris and encountered some problems, probably related more with TUN driver, than with openvpn itself
I'm using openvpn 2.1rc15 and tun driver 1.1 as recommended on openvpn.net site.
1. Openvpn is unable to close tun interface, if daemon is not running with root priveleges. with increased debug level it reports "not owner".
2. I was unable to run two openvpn daemons at once. First one starts, and second is unable to open another tun interface.
These problems was experienced on Solaris 10 intel both with 32-bit and 64-bit (amd64) kernel, and Solaris 10 sparc, 64-bit kernel.
Is this known issue and is there any workarounds/patches
Hi Victor,
I haven't tried this myself and this guide is mainly for OpenSolaris, but:
http://blogs.reucon.com/srt/2008/12/17/installing_openvpn_on_opensolaris_2008_11.html
The issue you're seeing with the driver can be remediated by using this patch:
http://www.whiteboard.ne.jp/~admin2/tuntap/
Good luck.
/Jonathan
Quoted 31 lines · Victor Wagner
Hi, all
I've tried to build Solaris OpenVPN packages for various versions of solaris and encountered some problems, probably related more with TUN driver, than with openvpn itself
I'm using openvpn 2.1rc15 and tun driver 1.1 as recommended on openvpn.net site.
1. Openvpn is unable to close tun interface, if daemon is not running with root priveleges. with increased debug level it reports "not owner".
2. I was unable to run two openvpn daemons at once. First one starts, and second is unable to open another tun interface.
These problems was experienced on Solaris 10 intel both with 32-bit and 64-bit (amd64) kernel, and Solaris 10 sparc, 64-bit kernel.
Is this known issue and is there any workarounds/patches
------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial Check out the new simplified licensign option that enables unlimited royalty-free distribution of the report engine for externally facing server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
Openvpn-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel
Quoted 4 lines · Jonathan Petersson
Hi Victor,
I haven't tried this myself and this guide is mainly for OpenSolaris, but:
http://blogs.reucon.com/srt/2008/12/17/installing_openvpn_on_opensolaris_2008_11.html
There is nothing particulary interesting here, except than linker switches for GNU ld (and I use Solaris LD anyway)
Quoted 2 lines
The issue you're seeing with the driver can be remediated by using this patch:
http://www.whiteboard.ne.jp/~admin2/tuntap/
I know of this updated driver. Unfortunately I haven't figured out way how to build 32-bit version of this driver on 64-bit machine. (I almost forgot autoconf language and would have to dig into docs for few hours to remember enough of it to add something like --disable-64bit).
And my task is to build a package which can be installed on any machine. So, I have to build both versions of driver on systems which support 64 bit.
Hi Victor,
Could you please post the script once you have built drivers for your package? So that I can update my script as well.
I've wanted to make script to be capable to build drivers on various platforms. But I don't have enough systems which can use for test. So if you would share your information, it would be appreciated.
Thanks,
Kazuyoshi
2009/4/25 Victor Wagner <[email protected]...>:
Quoted 36 lines · Jonathan Petersson
Quoted 5 lines
Hi Victor,
I haven't tried this myself and this guide is mainly for OpenSolaris, but:
http://blogs.reucon.com/srt/2008/12/17/installing_openvpn_on_opensolaris_2008_11.htmlThere is nothing particulary interesting here, except than linker switches for GNU ld (and I use Solaris LD anyway)
Quoted 2 lines
The issue you're seeing with the driver can be remediated by using this patch:
http://www.whiteboard.ne.jp/~admin2/tuntap/I know of this updated driver. Unfortunately I haven't figured out way how to build 32-bit version of this driver on 64-bit machine. (I almost forgot autoconf language and would have to dig into docs for few hours to remember enough of it to add something like --disable-64bit).
And my task is to build a package which can be installed on any machine. So, I have to build both versions of driver on systems which support 64 bit.
------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial Check out the new simplified licensign option that enables unlimited royalty-free distribution of the report engine for externally facing server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
Openvpn-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel
Quoted 7 lines · Kazuyoshi Aizawa
Hi Victor,
Could you please post the script once you have built drivers for your package? So that I can update my script as well.
I've wanted to make script to be capable to build drivers on various platforms. But I don't have enough systems which can use for test. So if you would share your information, it would be appreciated.
Of course. See attached patch (configure.patch).
_This patch does following changes:_
1. If isainfo not found, use uname -p to determine architecture instead of just fall back to i386. I assume that uname is always here on any Unix system.
2. Add --disable-64bit argument. If it is not given, everything work as before. If it is given, search for isainfo is disabled, and uname -p is used to determine architecture (and it always give 32-bit architecture).
3. Support for DESTDIR variable is added to make install. If this variable is given in the make command line (i.e.)
make install DESTDIR=pwd/pkg-tmp
files would be installed into $DESTDIR/usr/kernel instead of /usr/kernel and no add_drv/rem_drv would be run.
It is helpful when building a package to be installed on different machines, but not one which is used for building.
_Things this patch doesn't do:_
It would be nice to check whether ld used is GNU ld or SUN ld, and use correct ld options in each case (-m64 for GNU ld, and -64 for SUN ld). But I always use SUN ld, so I didn't give this change a high priority
It would be nice to check whether our cc is GCC or Sun Studio and use correct options for each compiler. But I don't have Sun Studio installed on any of my machines.
_Applying patch:_
chdir to directory of driver sources and run
patch -p1 < (whereever you've put attached configure.patch)
Using a patch program from SUNWcsu package (/usr/bin/patch) is OK (although it choke on plain diff -u output.)
_BTW:_ Why do you distribute modified tun.c file instead of patch? Using patch has following advantages:
1. If some changes was done in upstream, which do not touch patched functionality, patch produced with diff -u or diff -c probably would still apply and do the right thing
2. If there are incompatible changes in upstream, patch most likely would break and user would clearly see that something goes wrong.
3. Your modified tun.c for openvpn-2.1rc15 is 4452 lines, and unified diff between it and original one is 214 lines.
I'm attaching this patch too (solaris.tap.patch).
It should be applied with patch -p0
If you are interested, I would send my packaging makefiles which produce solaris package for your driver, which can be installed on both 32 and 64-bit machines. But somewhat later, because I've not finished them yet.
Sincerely yours, Victor
Index: tuntap/Makefile.in
Makefile.in +10 -9
@@ -50,15 +50,16 @@ $(CC) $(CFLAGS) -c tun.c -o tap.o -DTUNTAP_TAP install: modules - $(INSTALL) -m 644 -o root -g root if_tun.h /usr/include/net - $(INSTALL) -m 644 -o root -g root tun $(DRV_DIR) - $(INSTALL) -m 644 -o root -g root tap $(DRV_DIR) - $(INSTALL) -m 644 -o root -g root tun.conf $(DRV_CONF_DIR) - $(INSTALL) -m 644 -o root -g root tap.conf $(DRV_CONF_DIR) - -$(REM_DRV) tun >/dev/null 2>&1 - -$(REM_DRV) tap >/dev/null 2>&1 - $(ADD_DRV) tun - $(ADD_DRV) tap + $(INSTALL) -m 644 -o root -g root if_tun.h $(DESTDIR)/usr/include/net + $(INSTALL) -m 644 -o root -g root tun $(DESTDIR)$(DRV_DIR) + $(INSTALL) -m 644 -o root -g root tap $(DESTDIR)$(DRV_DIR) + $(INSTALL) -m 644 -o root -g root tun.conf $(DESTDIR)$(DRV_CONF_DIR) + $(INSTALL) -m 644 -o root -g root tap.conf $(DESTDIR)$(DRV_CONF_DIR) + -[ -n "$(DESTDIR)" ]&& $(REM_DRV) tun >/dev/null 2>&1 + -[ -n "$(DESTDIR)" ]&& $(REM_DRV) tap >/dev/null 2>&1 + -[ -n "$(DESTDIR)" ]&& $(ADD_DRV) tun + -[ -n "$(DESTDIR)" ]&& $(ADD_DRV) tap +endif clean: rm -f tun tap *.o *~
Index: tuntap/configure.in
configure.in +12 -4
@@ -24,14 +24,22 @@ AC_PROG_CC AC_PROG_INSTALL +AC_ARG_ENABLE([64bit], + [ --disable-64bit disable build of 64-bit driver], +[use_64bit="$enableval"],[use_64bit=yes]) + +if test "$use_64bit" = "yes" +then AC_CHECK_PROG(ISAINFO, isainfo, yes, no, /usr/bin) -if test "$ISAINFO" = "yes" ; +else +ISAINFO=no +fi +if test "$ISAINFO" = "yes" -a "$use_64bit" = "yes"; then KARCH=`/usr/bin/isainfo -k` else - KARCH='i386' + KARCH=`uname -p` fi - case $KARCH in 'sparc' | 'i386') M64_OPT=""
@@ -50,7 +58,7 @@ TUN_VER="$REL `date '+%m/%d/%Y'`"; export TUN_VER AC_ARG_ENABLE(debug, - --enable-debug Enable debuging, +[ --enable-debug Enable debuging], AC_DEFINE(TUN_DEBUG, 1) )
Index: tun.c
tun.c +109 -30
203 lines not on this page · raw message
Quoted 1 line · Victor Wagner
Of course. See attached patch (configure.patch).
Unfortunately, I've send untested patch. I've checked configure invocation, but was too haste to check whether produced Makefile would work.
Now there is tested patch.
Only thing is that to do make install without root rights (which is common thing when building package and installing into temporary directory) you need /usr/ucb/install from SUNscpu package.
Either included install-sh or GNU install from sunfreeware fails for unability to chown files.
With this patch I've been able to build package for
Solaris 8,9,10 both i386 and sparc. And all Sparc packages and 10/intel contain both 64-bit and 32-bit drivers.
I do not attach packaging Makefile yet, becouse it depends on my solaris packaging scripts, which are not published anywhere.
Index: tuntap/configure.in
configure.in +12 -4
@@ -24,14 +24,22 @@ AC_PROG_CC AC_PROG_INSTALL +AC_ARG_ENABLE([64bit], + [ --disable-64bit disable build of 64-bit driver], +[use_64bit="$enableval"],[use_64bit=yes]) + +if test "$use_64bit" = "yes" +then AC_CHECK_PROG(ISAINFO, isainfo, yes, no, /usr/bin) -if test "$ISAINFO" = "yes" ; +else +ISAINFO=no +fi +if test "$ISAINFO" = "yes" -a "$use_64bit" = "yes"; then KARCH=`/usr/bin/isainfo -k` else - KARCH='i386' + KARCH=`uname -p` fi - case $KARCH in 'sparc' | 'i386') M64_OPT=""
@@ -50,7 +58,7 @@ TUN_VER="$REL `date '+%m/%d/%Y'`"; export TUN_VER AC_ARG_ENABLE(debug, - --enable-debug Enable debuging, +[ --enable-debug Enable debuging], AC_DEFINE(TUN_DEBUG, 1) )
Index: tuntap/Makefile.in
Makefile.in +12 -9
@@ -50,15 +50,18 @@ $(CC) $(CFLAGS) -c tun.c -o tap.o -DTUNTAP_TAP install: modules - $(INSTALL) -m 644 -o root -g root if_tun.h /usr/include/net - $(INSTALL) -m 644 -o root -g root tun $(DRV_DIR) - $(INSTALL) -m 644 -o root -g root tap $(DRV_DIR) - $(INSTALL) -m 644 -o root -g root tun.conf $(DRV_CONF_DIR) - $(INSTALL) -m 644 -o root -g root tap.conf $(DRV_CONF_DIR) - -$(REM_DRV) tun >/dev/null 2>&1 - -$(REM_DRV) tap >/dev/null 2>&1 - $(ADD_DRV) tun - $(ADD_DRV) tap + [ -n "$(DESTDIR)" ] && $(INSTALL) -d -m 0755 -o root -g bin $(DESTDIR)/usr/include/net + [ -n "$(DESTDIR)" ] && $(INSTALL) -d -m 0755 -o root -g sys $(DESTDIR)$(DRV_DIR) + $(INSTALL) -m 644 -o root -g root if_tun.h $(DESTDIR)/usr/include/net + $(INSTALL) -m 644 -o root -g root tun $(DESTDIR)$(DRV_DIR) + $(INSTALL) -m 644 -o root -g root tap $(DESTDIR)$(DRV_DIR) + $(INSTALL) -m 644 -o root -g root tun.conf $(DESTDIR)$(DRV_CONF_DIR) + $(INSTALL) -m 644 -o root -g root tap.conf $(DESTDIR)$(DRV_CONF_DIR) + + -[ -z "$(DESTDIR)" ]&& $(REM_DRV) tun >/dev/null 2>&1 + -[ -z "$(DESTDIR)" ]&& $(REM_DRV) tap >/dev/null 2>&1 + -[ -z "$(DESTDIR)" ]&& $(ADD_DRV) tun + -[ -z "$(DESTDIR)" ]&& $(ADD_DRV) tap clean: rm -f tun tap *.o *~
Hi Victor,
Thank you very much for the patch and info. It is really helpful.
I intend to apply it to my script.
And I'll consider to provide tun.c as a patch.
Thanks,
Kazuyoshi
2009/4/27 Victor Wagner <[email protected]...>:
Quoted 38 lines · Victor Wagner
Quoted 2 lines
Of course. See attached patch (configure.patch).
Unfortunately, I've send untested patch. I've checked configure invocation, but was too haste to check whether produced
Makefilewould work.Now there is tested patch.
Only thing is that to do make install without root rights (which is common thing when building package and installing into temporary directory) you need
/usr/ucb/installfrom SUNscpu package.Either included install-sh or GNU install from sunfreeware fails for unability to chown files.
With this patch I've been able to build package for
Solaris 8,9,10 both i386 and sparc. And all Sparc packages and 10/intel contain both 64-bit and 32-bit drivers.I do not attach packaging
Makefileyet, becouse it depends on my solaris packaging scripts, which are not published anywhere.------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial Check out the new simplified licensign option that enables unlimited royalty-free distribution of the report engine for externally facing server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
Openvpn-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel
Hi,
I modified the build scripts of tun/tap driver for Solaris and uploaded it to web site below.
http://www.whiteboard.ne.jp/~admin2/tuntap/
Now, it is capable ..
to build 32bit module on 64bit environment by using --disable-64bit
option to configure script.
to checks if ld command is GNU ld or Solaris bundled ld. And then
appends appropriate option for GNU ld.
to specify target install directory using DESTDIR macro to make command.
Thanks Victor, for the info and help.
Kazuyoshi
Quoted 5 lines · Kazuyoshi Aizawa
Hi,
I modified the build scripts of tun/tap driver for Solaris and uploaded it to web site below.
I've filed a feature request in the solaris bug database some time ago concerning adding support for the tun/tap driver, so maybe you also leave your comments there, too. I've added your post to the RFE already
the url is
http://defect.opensolaris.org/bz/show_bug.cgi?id=6220
NOTE: The status CLOSED: TRACKEDINBUGSTER means that this RFE is tracked in the sun internal bug database, so there is still hope that this will be added to solaris :-)
Signature · 2 lines
"There are two major products that came out of Berkeley: LSD and UNIX. We don't believe this to be a coincidence." --Jeremy S. Anderson
Hi Carsten,
Thank you for the notice.
It would be nice if solaris itself support tun/tap driver. But at present, I believe my modified tun/tap driver still be usable to work with openvpn.
Please try this if interesting, and let me know if you find any defects.
Thanks,
Kazuyoshi
2009/5/1 Carsten Menke <[email protected]...>:
Quoted 27 lines
Quoted 6 lines · Kazuyoshi Aizawa
Hi,
I modified the build scripts of tun/tap driver for Solaris and uploaded it to web site below.
I've filed a feature request in the solaris bug database some time ago concerning adding support for the tun/tap driver, so maybe you also leave your comments there, too. I've added your post to the RFE already
the url is
http://defect.opensolaris.org/bz/show_bug.cgi?id=6220
NOTE: The status CLOSED: TRACKEDINBUGSTER means that this RFE is tracked in the sun internal bug database, so there is still hope that this will be added to solaris :-)
--
"There are two major products that came out of Berkeley: LSD and UNIX. We don't believe this to be a coincidence." --Jeremy S. Anderson