summaryrefslogtreecommitdiffstats
path: root/usr
diff options
context:
space:
mode:
authorgnhb <gnoahb@gmail.com>2010-04-09 18:16:32 +0700
committergnhb <gnoahb@gmail.com>2010-04-09 18:16:32 +0700
commit4aa64f79f030987d9745a3500df95be360b1de64 (patch)
tree7972d1affcb58b94890b16267f1541af193ec459 /usr
parenta3fa7aaccd962c887b6688729d6e99d6a694c7c7 (diff)
downloadpfsense-4aa64f79f030987d9745a3500df95be360b1de64.zip
pfsense-4aa64f79f030987d9745a3500df95be360b1de64.tar.gz
Configure interface when changing settings, and fix init string field.
The interface configure function is called after "write_config()" because we must write the new data to the config before reading the config to bring up the interface with the new settings.
Diffstat (limited to 'usr')
-rw-r--r--usr/local/www/interfaces_ppp_edit.php12
1 files changed, 7 insertions, 5 deletions
diff --git a/usr/local/www/interfaces_ppp_edit.php b/usr/local/www/interfaces_ppp_edit.php
index f3aae99..c6a23ec 100644
--- a/usr/local/www/interfaces_ppp_edit.php
+++ b/usr/local/www/interfaces_ppp_edit.php
@@ -136,19 +136,21 @@ if ($_POST) {
unset($ppp['connect-timeout']);
$ppp['descr'] = $_POST['descr'];
-
$iflist = get_configured_interface_list();
foreach ($iflist as $if) {
- if ($config['interfaces'][$if]['if'] == basename($a_ppps[$id]['port']))
+ if ($config['interfaces'][$if]['if'] == basename($a_ppps[$id]['port'])) {
$config['interfaces'][$if]['if'] = basename($ppp['port']);
+ $thisif = $if;
+ }
}
-
if (isset($id) && $a_ppps[$id])
$a_ppps[$id] = $ppp;
else
$a_ppps[] = $ppp;
-
+
write_config();
+ if (!empty($thisif))
+ interface_ppp_configure($thisif);
header("Location: interfaces_ppp.php");
exit;
@@ -230,7 +232,7 @@ include("head.inc");
<tr>
<td width="22%" valign="top" class="vncell">Init String</td>
<td width="78%" class="vtable">
- <input type="text" size="40" class="formfld unknown" id="initstr" name="initstr"><?=htmlspecialchars($pconfig['initstr']);?></textarea>
+ <input type="text" size="40" class="formfld unknown" id="initstr" name="initstr" value="<?=htmlspecialchars($pconfig['initstr']);?>">
<br><span class="vexpl">Note: Enter the modem initialization string here. Do NOT include the "AT" string at the beginning of the command.</span>
</td>
</tr>
OpenPOWER on IntegriCloud