summaryrefslogtreecommitdiffstats
path: root/usr
diff options
context:
space:
mode:
authorErmal <eri@pfsense.org>2011-09-12 22:30:37 +0000
committerErmal <eri@pfsense.org>2011-09-12 22:30:52 +0000
commitafe88d69235f84530ed6386b22cfc9c488bf94c5 (patch)
tree02970a08664303cff14e88a58c8138c833941224 /usr
parent8678130da6c30f82272a1b27b190da3e90211bf1 (diff)
downloadpfsense-afe88d69235f84530ed6386b22cfc9c488bf94c5.zip
pfsense-afe88d69235f84530ed6386b22cfc9c488bf94c5.tar.gz
Another try at prventing panic on reconfig of ppp type wans. Ticket #1696
Diffstat (limited to 'usr')
-rw-r--r--usr/local/www/wizards/setup_wizard.xml25
1 files changed, 12 insertions, 13 deletions
diff --git a/usr/local/www/wizards/setup_wizard.xml b/usr/local/www/wizards/setup_wizard.xml
index 01d1e5c..5cb794b 100644
--- a/usr/local/www/wizards/setup_wizard.xml
+++ b/usr/local/www/wizards/setup_wizard.xml
@@ -420,19 +420,18 @@
}
$type = $_POST['selectedtype'];
- if (!is_array($config['ppps']['ppp']))
- $config['ppps']['ppp'] = array();
- if (count($config['ppps']['ppp'])) {
- foreach ($config['ppps']['ppp'] as $pppid => $ppp) {
- if ($ppp['ptpid'] == "0") {
- if ((substr($config['interfaces']['wan']['if'],0,5) == "pppoe") || (substr($config['interfaces']['wan']['if'],0,4) == "pptp")) {
- $oldif = explode(",", $ppp['ports']);
- $config['interfaces']['wan']['if'] = $oldif[0];
- }
- if ($type == "pppoe" || $type == "pptp")
- unset($config['ppps']['ppp'][$pppid]);
- }
- }
+ $wanif = "";
+ if (is_array($config['ppps']['ppp']) && count($config['ppps']['ppp'])) {
+ foreach ($config['ppps']['ppp'] as $pppid => $ppp) {
+ if ($realif == $ppp['if']) {
+ $ifaces = explode(",", $ppp['ports']);
+ $wanif = $ifaces[0];
+ }
+ }
+ }
+ if (!empty($wanif)) {
+ $config['interfaces']['wan']['if'] = $wanif;
+ unset($config['ppps']['ppp'][$pppid]);
}
if ($type == "pppoe" || $type == "pptp") {
OpenPOWER on IntegriCloud