summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2011-09-12 17:06:51 -0400
committerjim-p <jimp@pfsense.org>2011-09-12 17:08:34 -0400
commit75bb4bc3849cda6af49ee51cc495353dcb5ad489 (patch)
tree7af751eb5963e843e06f3cba5156d7aa164dca8b
parent83490f07b0f2f2b7908af90af88d88ebe6944df7 (diff)
downloadpfsense-75bb4bc3849cda6af49ee51cc495353dcb5ad489.zip
pfsense-75bb4bc3849cda6af49ee51cc495353dcb5ad489.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
-rw-r--r--usr/local/www/wizards/setup_wizard.xml22
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'];
OpenPOWER on IntegriCloud