summaryrefslogtreecommitdiffstats
path: root/usr/local/www/interfaces_ppps_edit.php
diff options
context:
space:
mode:
authorErmal <eri@pfsense.org>2011-03-15 12:17:12 +0000
committerErmal <eri@pfsense.org>2011-03-15 12:17:12 +0000
commit01c201e3d19dd7fc37e8b33f1d27861e514c805c (patch)
treec0f4aa1b99ce67a0c615e25d3fba286cc143ab4d /usr/local/www/interfaces_ppps_edit.php
parent96f1a57a168fcca66d7c5079ff2b22f5ea444494 (diff)
downloadpfsense-01c201e3d19dd7fc37e8b33f1d27861e514c805c.zip
pfsense-01c201e3d19dd7fc37e8b33f1d27861e514c805c.tar.gz
Do more strict checking if an ppp type interface is assigned before starting the mpd process behind it. Trigered-by: http://forum.pfsense.org/index.php/topic,34377.0.html
Diffstat (limited to 'usr/local/www/interfaces_ppps_edit.php')
-rw-r--r--usr/local/www/interfaces_ppps_edit.php21
1 files changed, 8 insertions, 13 deletions
diff --git a/usr/local/www/interfaces_ppps_edit.php b/usr/local/www/interfaces_ppps_edit.php
index 140b998..1f3c748 100644
--- a/usr/local/www/interfaces_ppps_edit.php
+++ b/usr/local/www/interfaces_ppps_edit.php
@@ -54,8 +54,9 @@ if (!is_array($config['ppps']['ppp']))
$a_ppps = &$config['ppps']['ppp'];
+$iflist = get_configured_interface_with_descr();
$portlist = get_interface_list();
-$portlist = array_merge($portlist, get_configured_interface_with_descr());
+$portlist = array_merge($portlist, $iflist);
$id = $_GET['id'];
if (isset($_POST['id']))
@@ -355,24 +356,18 @@ if ($_POST) {
must be able to clear the config data in the <cron> section of config.xml if it exists
*/
handle_pppoe_reset($_POST);
-
- $iflist = get_configured_interface_list();
- foreach ($iflist as $if) {
- if ($config['interfaces'][$if]['if'] == $ppp['if']){
- $thisif = $if;
- break;
- }
- }
+
if (isset($id) && $a_ppps[$id])
$a_ppps[$id] = $ppp;
else
$a_ppps[] = $ppp;
-
+
write_config();
configure_cron();
-
- if (isset($thisif)){
- interface_ppps_configure($thisif);
+
+ foreach ($iflist as $pppif => $ifdescr) {
+ if ($config['interfaces'][$if]['if'] == $ppp['if'])
+ interface_ppps_configure($pppif);
}
header("Location: interfaces_ppps.php");
exit;
OpenPOWER on IntegriCloud