Fixes #1976. Correct passthrough mac entries to not overwrite each other this is different from allowed ips that used tables.

This commit is contained in:
Ermal 2011-11-02 14:59:12 +00:00
parent f6ee561edb
commit a135349d62

View File

@ -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")) {