From a135349d62a1932cb1ab9c29436efcd8e8a383d5 Mon Sep 17 00:00:00 2001 From: Ermal Date: Wed, 2 Nov 2011 14:59:12 +0000 Subject: [PATCH] Fixes #1976. Correct passthrough mac entries to not overwrite each other this is different from allowed ips that used tables. --- etc/inc/captiveportal.inc | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/etc/inc/captiveportal.inc b/etc/inc/captiveportal.inc index 93f3642b1d..b509444202 100644 --- a/etc/inc/captiveportal.inc +++ b/etc/inc/captiveportal.inc @@ -884,10 +884,7 @@ function captiveportal_passthrumac_configure_entry($macent) { $actionup = "allow"; $actiondown = "allow"; - if ($enBwup && $enBwdown) - $ruleno = captiveportal_get_next_ipfw_ruleno(2000, 49899, true); - else - $ruleno = captiveportal_get_next_ipfw_ruleno(2000, 49899, false); + $ruleno = captiveportal_get_next_ipfw_ruleno(2000, 49899, true); if ($enBwup) { $bw_up = $ruleno + 20000; @@ -1369,7 +1366,7 @@ function captiveportal_get_ipfw_passthru_ruleno($value) { global $config, $g; if(!isset($config['captiveportal']['enable'])) - return NULL; + return NULL; $cpruleslck = lock('captiveportalrules', LOCK_EX); if (file_exists("{$g['vardb_path']}/captiveportal.rules")) {