diff options
author | jim-p <jimp@pfsense.org> | 2011-09-12 17:06:51 -0400 |
---|---|---|
committer | jim-p <jimp@pfsense.org> | 2011-09-12 17:06:51 -0400 |
commit | 8678130da6c30f82272a1b27b190da3e90211bf1 (patch) | |
tree | 92207de794bae61bdf5383a8577059cf140ddd79 /usr/local/www/wizards | |
parent | 3a11fef2b0b44a8747eaddb43a80b0667b99a88d (diff) | |
download | pfsense-8678130da6c30f82272a1b27b190da3e90211bf1.zip pfsense-8678130da6c30f82272a1b27b190da3e90211bf1.tar.gz |
If we are coming from a PPPoE/PPTP WAN type, grab the old physical interface first to avoid assigning a ppp interface to itself. Fixes pppoe->pppoe wizard run as well as changing pppoe->dhcp. Fixes #1696
Diffstat (limited to 'usr/local/www/wizards')
-rw-r--r-- | usr/local/www/wizards/setup_wizard.xml | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/usr/local/www/wizards/setup_wizard.xml b/usr/local/www/wizards/setup_wizard.xml index a3607e6..01d1e5c 100644 --- a/usr/local/www/wizards/setup_wizard.xml +++ b/usr/local/www/wizards/setup_wizard.xml @@ -419,17 +419,23 @@ die; } $type = $_POST['selectedtype']; - if ($type == "pppoe" || $type == "pptp") { - 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") { - unset($config['ppps']['ppp'][$pppid]); - // break; + + 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]); } } + } + + if ($type == "pppoe" || $type == "pptp") { if ($type == "pptp") { $config['wizardtemp']['wan']['username'] = $config['wizardtemp']['wan']['pptpusername']; $config['wizardtemp']['wan']['password'] = $config['wizardtemp']['wan']['pptppassword']; |