From 67e5e3c6dbf7aa05a4b4fbaa2ebcee8328aa5648 Mon Sep 17 00:00:00 2001 From: Renato Botelho Date: Sat, 14 Sep 2013 11:17:43 -0300 Subject: [PATCH] Set action = pass for configured mac addresses on CP passtrumac --- conf.default/config.xml | 2 +- etc/inc/globals.inc | 2 +- etc/inc/upgrade_config.inc | 15 +++++++++++++++ 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/conf.default/config.xml b/conf.default/config.xml index 2996d34ee1..5287964c1c 100644 --- a/conf.default/config.xml +++ b/conf.default/config.xml @@ -1,7 +1,7 @@ - 9.8 + 9.9 pfsense_ng diff --git a/etc/inc/globals.inc b/etc/inc/globals.inc index 628ac9f579..9cb9fad462 100644 --- a/etc/inc/globals.inc +++ b/etc/inc/globals.inc @@ -72,7 +72,7 @@ $g = array( "disablecrashreporter" => false, "crashreporterurl" => "http://crashreporter.pfsense.org/crash_reporter.php", "debug" => false, - "latest_config" => "9.8", + "latest_config" => "9.9", "nopkg_platforms" => array("cdrom"), "minimum_ram_warning" => "101", "minimum_ram_warning_text" => "128 MB", diff --git a/etc/inc/upgrade_config.inc b/etc/inc/upgrade_config.inc index 8093ff3ef8..1c17215654 100644 --- a/etc/inc/upgrade_config.inc +++ b/etc/inc/upgrade_config.inc @@ -3142,4 +3142,19 @@ function upgrade_097_to_098() { /* Disable kill_states by default */ $config['system']['kill_states'] = true; } + +function upgrade_098_to_099() { + global $config, $g; + + if (!is_array($config['captiveportal'])) + return; + + foreach ($config['captiveportal'] as $cpzone => $cp) { + if (!is_array($cp['passthrumac'])) + continue; + + foreach ($cp['passthrumac'] as $idx => $passthrumac) + $config['captiveportal'][$cpzone]['passthrumac'][$idx]['action'] = 'pass'; + } +} ?>