Revision: 2736
http://ipcop.svn.sourceforge.net/ipcop/?rev=2736&view=rev
Author: owes
Date: 2009-04-20 13:20:15 +0000 (Mon, 20 Apr 2009)
Log Message:
-----------
We only need 1 set of rules for OpenVPN tun device
Modified Paths:
--------------
ipcop/trunk/src/libs/DataAccess.pl
Modified: ipcop/trunk/src/libs/DataAccess.pl
===================================================================
--- ipcop/trunk/src/libs/DataAccess.pl 2009-04-20 13:17:56 UTC (rev 2735)
+++ ipcop/trunk/src/libs/DataAccess.pl 2009-04-20 13:20:15 UTC (rev 2736)
@@ -489,8 +489,13 @@
my %ovpnSettings = ();
&General::readhash("/var/ipcop/ovpn/settings", \%ovpnSettings);
+ # We add only 1 interface here, since the OpenVPN server only creates
1 tunnel interface
+ # This will probably change as soon as we add OpenVPN net-2-net
+
+ # TODO: find the tunX interface used by the OpenVPN server and not fix
to tun0
+
# OpenVPN on Red?
- if (defined($ovpnSettings{'ENABLED_RED_1'}) &&
$ovpnSettings{'ENABLED_RED_1'} eq 'on') {
+ if (defined($ovpnSettings{'ENABLED_RED_1'}) &&
$ovpnSettings{'ENABLED_RED_1'} eq 'on' && ($ifaceCounts->{'OPENVPN'} == 0)) {
$ifaces->{"OpenVPN-Red"}{'IFACE'} = 'tun0';
$ifaces->{"OpenVPN-Red"}{'ID'} = '';
$ifaces->{"OpenVPN-Red"}{'COLOR'} = 'OVPN_COLOR';
@@ -499,7 +504,7 @@
}
# OpenVPN on Blue?
- if (defined($ovpnSettings{'ENABLED_BLUE_1'}) &&
$ovpnSettings{'ENABLED_BLUE_1'} eq 'on') {
+ if (defined($ovpnSettings{'ENABLED_BLUE_1'}) &&
$ovpnSettings{'ENABLED_BLUE_1'} eq 'on' && ($ifaceCounts->{'OPENVPN'} == 0)) {
$ifaces->{"OpenVPN-Blue"}{'IFACE'} = 'tun0';
$ifaces->{"OpenVPN-Blue"}{'ID'} = '';
$ifaces->{"OpenVPN-Blue"}{'COLOR'} = 'OVPN_COLOR';
@@ -508,7 +513,7 @@
}
# OpenVPN on Orange?
- if (defined($ovpnSettings{'ENABLED_ORANGE_1'}) &&
$ovpnSettings{'ENABLED_ORANGE_1'} eq 'on') {
+ if (defined($ovpnSettings{'ENABLED_ORANGE_1'}) &&
$ovpnSettings{'ENABLED_ORANGE_1'} eq 'on' && ($ifaceCounts->{'OPENVPN'} == 0)) {
$ifaces->{"OpenVPN-Orange"}{'IFACE'} = 'tun0';
$ifaces->{"OpenVPN-Orange"}{'ID'} = '';
$ifaces->{"OpenVPN-Orange"}{'COLOR'} = 'OVPN_COLOR';
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Stay on top of everything new and different, both inside and
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today.
Use priority code J9JMT32. http://p.sf.net/sfu/p
_______________________________________________
Ipcop-svn mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ipcop-svn