diff options
author | Ermal Luçi <eri@pfsense.org> | 2010-01-27 23:26:38 +0000 |
---|---|---|
committer | Ermal Luçi <eri@pfsense.org> | 2010-01-27 23:26:38 +0000 |
commit | daf8594a23dff7506c8fb52cffa63a37fefedb23 (patch) | |
tree | 4f18fceff4f249625bc89b1ccf3ba6938afce71e /usr | |
parent | f26baf72d15d689c2ffca9ac7e77a64d2c2428a3 (diff) | |
download | pfsense-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')
-rw-r--r-- | usr/local/www/interfaces_ppp_edit.php | 12 |
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> |