diff options
author | Ermal <eri@pfsense.org> | 2010-12-28 22:39:51 +0000 |
---|---|---|
committer | Ermal <eri@pfsense.org> | 2010-12-28 22:39:51 +0000 |
commit | 66bcba1bcd80677a38d63abbec5fb8316d55b7f4 (patch) | |
tree | 2b2da88ac7a344464814582159eb62623d448cda /usr/local | |
parent | c3583058a0c2cd89ceacbbbcceb68a976e07a890 (diff) | |
download | pfsense-66bcba1bcd80677a38d63abbec5fb8316d55b7f4.zip pfsense-66bcba1bcd80677a38d63abbec5fb8316d55b7f4.tar.gz |
Ticket #802. During a config restore detect if the vlan interfaces need reassignment too. This might be problematic for other type of interfaces on 2.0!
Diffstat (limited to 'usr/local')
-rwxr-xr-x | usr/local/www/diag_backup.php | 7 | ||||
-rwxr-xr-x | usr/local/www/interfaces_assign.php | 6 |
2 files changed, 13 insertions, 0 deletions
diff --git a/usr/local/www/diag_backup.php b/usr/local/www/diag_backup.php index 410fb0b..6ff65fe 100755 --- a/usr/local/www/diag_backup.php +++ b/usr/local/www/diag_backup.php @@ -451,6 +451,13 @@ if ($_POST) { header("Location: interfaces_assign.php"); exit; } + if (is_interface_vlan_mismatch() == true) { + touch("/var/run/interface_mismatch_reboot_needed"); + clear_subsystem_dirty("restore"); + convert_config(); + header("Location: interfaces_assign.php"); + exit; + } } else { $input_errors[] = gettext("The configuration could not be restored."); } diff --git a/usr/local/www/interfaces_assign.php b/usr/local/www/interfaces_assign.php index 340ee78..3d2cec0 100755 --- a/usr/local/www/interfaces_assign.php +++ b/usr/local/www/interfaces_assign.php @@ -191,6 +191,12 @@ if ($_POST['apply']) { } } + if (is_array($config['vlans']['vlan'])) { + foreach ($config['vlans']['vlan'] as $vlan) { + if (does_interface_exist($vlan['if']) == false) + $input_errors[] = "Vlan parent interface {$vlan['if']} does not exist anymore so vlan id {$vlan['tag']} cannot be created please fix the issue before continuing."; + } + } if (!$input_errors) { /* No errors detected, so update the config */ |