summaryrefslogtreecommitdiffstats
path: root/usr/local/www/interfaces_ppp_edit.php
diff options
context:
space:
mode:
authorErmal Luçi <eri@pfsense.org>2010-01-27 23:26:38 +0000
committerErmal Luçi <eri@pfsense.org>2010-01-27 23:26:38 +0000
commitdaf8594a23dff7506c8fb52cffa63a37fefedb23 (patch)
tree4f18fceff4f249625bc89b1ccf3ba6938afce71e /usr/local/www/interfaces_ppp_edit.php
parentf26baf72d15d689c2ffca9ac7e77a64d2c2428a3 (diff)
downloadpfsense-daf8594a23dff7506c8fb52cffa63a37fefedb23.zip
pfsense-daf8594a23dff7506c8fb52cffa63a37fefedb23.tar.gz
Add a checkbox to allow setting a 3G/dialup modem as the default interface/gateway.
Diffstat (limited to 'usr/local/www/interfaces_ppp_edit.php')
-rw-r--r--usr/local/www/interfaces_ppp_edit.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/usr/local/www/interfaces_ppp_edit.php b/usr/local/www/interfaces_ppp_edit.php
index 216521a..1a034f3 100644
--- a/usr/local/www/interfaces_ppp_edit.php
+++ b/usr/local/www/interfaces_ppp_edit.php
@@ -62,6 +62,8 @@ if (isset($id) && $a_ppps[$id]) {
$pconfig['password'] = $a_ppps[$id]['password'];
$pconfig['gateway'] = $a_ppps[$id]['gateway'];
$pconfig['localip'] = $a_ppps[$id]['localip'];
+ if (isset($a_ppps[$id]['defaultgw']))
+ $pconfig['defaultgw'] = true;
$pconfig['phone'] = $a_ppps[$id]['phone'];
$pconfig['dialcmd'] = base64_decode($a_ppps[$id]['dialcmd']);
$pconfig['connect-max-attempts'] = $a_ppps[$id]['connect-max-attempts'];
@@ -101,6 +103,10 @@ if ($_POST) {
$ppp['password'] = $_POST['password'];
$ppp['localip'] = $_POST['localip'];
$ppp['gateway'] = $_POST['gateway'];
+ if ($_POST['defaultgw'] == "on")
+ $ppp['defaultgw'] = true;
+ else
+ unset($ppp['defaultgw']);
$ppp['linespeed'] = $_POST['linespeed'];
$ppp['connect-max-attempts'] = $_POST['connect-max-attempts'];
$ppp['descr'] = $_POST['descr'];
@@ -181,6 +187,12 @@ include("head.inc");
</td>
</tr>
<tr>
+ <td width="22%" valign="top" class="vncell">Link Type</td>
+ <td width="78%" class="vtable">
+ <input type="checkbox" value="on" id="defaultgw" name="defaultgw" <?php if (isset($pconfig['defaultgw'])) "echo checked"; ?>>This link will be used as default gateway.
+ </td>
+ </tr>
+ <tr>
<td width="22%" valign="top" class="vncell">Init String</td>
<td width="78%" class="vtable">
<textarea id="initstr" name="initstr"><?=htmlspecialchars($pconfig['initstr']);?></textarea>
OpenPOWER on IntegriCloud