]> git.gsnw.org Git - m0n0chwall.git/commitdiff
Change captiveportal_get_next_ipfw_ruleno function to adapt dynamically to the firewa...
authorjdegraeve <jdegraeve@e36fee2c-cc09-0410-a7cc-ebac5c6737de>
Wed, 29 Mar 2006 22:14:34 +0000 (22:14 +0000)
committerjdegraeve <jdegraeve@e36fee2c-cc09-0410-a7cc-ebac5c6737de>
Wed, 29 Mar 2006 22:14:34 +0000 (22:14 +0000)
git-svn-id: https://svn.m0n0.ch/wall/trunk@118 e36fee2c-cc09-0410-a7cc-ebac5c6737de

phpconf/inc/captiveportal.inc
webgui/license.php

index a7d2ae1201ddbdd4ca14769f063406adb6b2b5cf..70acace967338b2c33ba8dad88fb5925e44a785a 100644 (file)
@@ -892,15 +892,15 @@ function captiveportal_write_elements() {
  *
  */
 
-function captiveportal_get_next_ipfw_ruleno() {
+function captiveportal_get_next_ipfw_ruleno($rulenos_start = 10000) {
 
     exec("/sbin/ipfw show", $fwrules);
     foreach ($fwrules as $fwrule) {
         preg_match("/^(\d+)\s+/", $fwrule, $matches);
         $rulenos_used[] = $matches[1];
     }
-    $rulenos_pool = range(10000, 19899);
     $rulenos_used = array_unique($rulenos_used);
+    $rulenos_pool = range($rulenos_start, ($rulenos_start + count($rulenos_used)));
     $rulenos_free = array_diff($rulenos_pool, $rulenos_used);
     $ruleno = array_shift($rulenos_free);
 
index b7626b59c0b5c6106d4fab538e2c4359e7240940..bd06ca2c5ed998dbecbba32fa75432d8b287a010 100755 (executable)
@@ -166,8 +166,8 @@ require("guiconfig.inc");
               &nbsp;&nbsp;&nbsp;&nbsp;<em><font color="#666666">Webgui users/groups</font></em><br>
                          <br>
               Jonathan De Graeve (<a href="mailto:Jonathan.De.Graeve@imelda.be">Jonathan.De.Graeve@imelda.be</a>)<br>
-              &nbsp;&nbsp;&nbsp;&nbsp;<em><font color="#666666">Complete captive portal RADIUS overhaul, cleanup</font></em></p>
-              &nbsp;&nbsp;&nbsp;&nbsp;<em><font color="#666666">captive portal: file manager, volume stats, FW rulepool (virtual port pool)</font></em></p>
+              &nbsp;&nbsp;&nbsp;&nbsp;<em><font color="#666666">Complete captive portal RADIUS overhaul, cleanup</font></em><br>
+              &nbsp;&nbsp;&nbsp;&nbsp;<em><font color="#666666">captive portal: file manager, volume stats, FW rulepool (virtual port pool)</font></em><br>
             <hr size="1">
             <p>m0n0wall is based upon/includes various free software packages, 
               listed below.<br>