Revision: 6480
          http://ipcop.svn.sourceforge.net/ipcop/?rev=6480&view=rev
Author:   owes
Date:     2012-03-14 21:02:04 +0000 (Wed, 14 Mar 2012)
Log Message:
-----------
Tweak RW config to also work with FQDN instead of %defaultroute for RED IP

Modified Paths:
--------------
    ipcop/trunk/src/libs/vpn-functions.pl
    ipcop/trunk/updates/2.1.0/ROOTFILES.i486-2.1.0

Modified: ipcop/trunk/src/libs/vpn-functions.pl
===================================================================
--- ipcop/trunk/src/libs/vpn-functions.pl       2012-03-14 19:09:16 UTC (rev 
6479)
+++ ipcop/trunk/src/libs/vpn-functions.pl       2012-03-14 21:02:04 UTC (rev 
6480)
@@ -11,10 +11,9 @@
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with IPCop; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+# along with IPCop.  If not, see <http://www.gnu.org/licenses/>.
 #
-# (c) 2009-2010 The IPCop Team
+# (c) 2009-2012 The IPCop Team
 #
 # $Id$
 #
@@ -252,7 +251,13 @@
         # TODO openswan does not like #comment behind conn thingy
         print CONF "#$lconfighash{$key}[26]\n";
         print CONF "conn $lconfighash{$key}[1]\n";
-        print CONF "\tleft=$localside\n";
+        if (($lconfighash{$key}[3] eq 'host') && ($lconfighash{$key}[4] eq 
'psk') && ($lconfighash{$key}[26] eq 'RED')) {
+            # Force left=%defaultroute for RW using PSK on RED. Openswan 
complains about the FQDN in this special case, probably because right=%any
+            print CONF "\tleft=%defaultroute\n";
+        }
+        else {
+            print CONF "\tleft=$localside\n";
+        }
         # TODO: openswan 2.6 does not seem to need nexthop
         #print CONF "\tleftnexthop=%defaultroute\n" if ($lconfighash{$key}[26] 
eq 'RED' && $lvpnsettings{'VPN_IP'} ne '%defaultroute');
         print CONF "\tleftsubnet=$lconfighash{$key}[8]\n";

Modified: ipcop/trunk/updates/2.1.0/ROOTFILES.i486-2.1.0
===================================================================
--- ipcop/trunk/updates/2.1.0/ROOTFILES.i486-2.1.0      2012-03-14 19:09:16 UTC 
(rev 6479)
+++ ipcop/trunk/updates/2.1.0/ROOTFILES.i486-2.1.0      2012-03-14 21:02:04 UTC 
(rev 6480)
@@ -18,6 +18,7 @@
 /usr/lib/ipcop/general-functions.pl
 /usr/lib/ipcop/library.sh
 /usr/lib/ipcop/scheduler-lib.pl
+/usr/lib/ipcop/vpn-functions.pl
 /usr/local/bin/blacklistupdate.pl
 /usr/local/bin/ipsecctrl
 /usr/local/bin/puzzleFwRules.pl

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
Ipcop-svn mailing list
Ipcop-svn@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ipcop-svn

Reply via email to