Revision: 5555
          http://ipcop.svn.sourceforge.net/ipcop/?rev=5555&view=rev
Author:   dotzball
Date:     2011-03-24 20:02:37 +0000 (Thu, 24 Mar 2011)

Log Message:
-----------
Fix subnets + networks acls.

Modified Paths:
--------------
    ipcop/trunk/html/cgi-bin/proxy.cgi

Modified: ipcop/trunk/html/cgi-bin/proxy.cgi
===================================================================
--- ipcop/trunk/html/cgi-bin/proxy.cgi  2011-03-24 19:37:56 UTC (rev 5554)
+++ ipcop/trunk/html/cgi-bin/proxy.cgi  2011-03-24 20:02:37 UTC (rev 5555)
@@ -1233,7 +1233,10 @@
     {
         print 
"$netsettings{'BLUE_1_NETADDRESS'}\/$netsettings{'BLUE_1_NETMASK'}\n";
     }
-} else { print $proxysettings{'SRC_SUBNETS'}; }
+}
+else {
+    print $proxysettings{'SRC_SUBNETS'};
+}
 
 print <<END
 </textarea></td>
@@ -2796,29 +2799,35 @@
     flock(FILE, 2);
     if (!$proxysettings{'SRC_SUBNETS'})
     {
-        print FILE "NetAddr::IP->new 
$netsettings{'GREEN_1_NETADDRESS'}\/$netsettings{'GREEN_1_NETMASK'}\n";
+        print FILE 
NetAddr::IP->new("$netsettings{'GREEN_1_NETADDRESS'}\/$netsettings{'GREEN_1_NETMASK'}")."\n";
         if ($netsettings{'BLUE_COUNT'} >= 1)
         {
-            print FILE "NetAddr::IP->new 
$netsettings{'BLUE_1_NETADDRESS'}\/$netsettings{'BLUE_1_NETMASK'}\n";
+            print FILE 
NetAddr::IP->new("$netsettings{'BLUE_1_NETADDRESS'}\/$netsettings{'BLUE_1_NETMASK'}")."\n";
         }
-    } else { print FILE $proxysettings{'SRC_SUBNETS'}; }
+    }
+    else {
+        print FILE $proxysettings{'SRC_SUBNETS'};
+    }
     close(FILE);
 
     open(FILE, ">$acl_src_networks");
     flock(FILE, 2);
     if (!$proxysettings{'SRC_SUBNETS'})
     {
-        print FILE "NetAddr::IP->new 
$netsettings{'GREEN_1_NETADDRESS'}\/$netsettings{'GREEN_1_NETMASK'}\n";
+        print FILE 
NetAddr::IP->new("$netsettings{'GREEN_1_NETADDRESS'}\/$netsettings{'GREEN_1_NETMASK'}")."\n";
         if ($netsettings{'BLUE_COUNT'} >= 1)
         {
-            print FILE "NetAddr::IP->new 
$netsettings{'BLUE_1_NETADDRESS'}\/$netsettings{'BLUE_1_NETMASK'}\n";
+            print FILE 
NetAddr::IP->new("$netsettings{'BLUE_1_NETADDRESS'}\/$netsettings{'BLUE_1_NETMASK'}")."\n";
         }
-    } else { print FILE $proxysettings{'SRC_SUBNETS'}; }
+    }
+    else {
+        print FILE $proxysettings{'SRC_SUBNETS'};
+    }
 
     if (($proxysettings{'ENABLED_OVPN'} eq 'on') &&
         ((defined($ovpnsettings{'ENABLED_RED_1'}) && 
$ovpnsettings{'ENABLED_RED_1'} eq 'on')
             || (defined($ovpnsettings{'ENABLED_BLUE_1'}) && 
$ovpnsettings{'ENABLED_BLUE_1'} eq 'on'))) {
-        print FILE "$ovpnsettings{'DOVPN_SUBNET'}\n";
+        print FILE NetAddr::IP->new("$ovpnsettings{'DOVPN_SUBNET'}")."\n";
     }
     close(FILE);
 


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

------------------------------------------------------------------------------
Enable your software for Intel(R) Active Management Technology to meet the
growing manageability and security demands of your customers. Businesses
are taking advantage of Intel(R) vPro (TM) technology - will your software 
be a part of the solution? Download the Intel(R) Manageability Checker 
today! http://p.sf.net/sfu/intel-dev2devmar
_______________________________________________
Ipcop-svn mailing list
Ipcop-svn@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ipcop-svn

Reply via email to