summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgnhb <gnoahb@gmail.com>2010-05-26 21:17:52 +0700
committergnhb <gnoahb@gmail.com>2010-05-26 21:17:52 +0700
commit82effddb556d582f4eb39c49612f4f427c623de2 (patch)
tree7682517047cf73cd57fbec45ee2c443cc4584add
parent0661b194d96764d8cb2f09eb8615c558b9a57bec (diff)
downloadpfsense-82effddb556d582f4eb39c49612f4f427c623de2.zip
pfsense-82effddb556d582f4eb39c49612f4f427c623de2.tar.gz
Remove all "defaultgw" settings from PPPs config page.
Just use existing defaultgw configuration settings from System:Gateways settings.
-rw-r--r--etc/inc/interfaces.inc15
-rw-r--r--usr/local/www/interfaces_ppps_edit.php11
2 files changed, 6 insertions, 20 deletions
diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc
index 9bdfa43..d33294e 100644
--- a/etc/inc/interfaces.inc
+++ b/etc/inc/interfaces.inc
@@ -1158,19 +1158,14 @@ EOD;
}
}
}
- if (($interface == "wan" && $founddefaultgw == false) || $setdefaultgw == true)
- $mpdconf .= <<<EOD
- set iface route default
-
-EOD;
-/*
- if (isset($ppp['defaultgw']))
+
+ if (($interface == "wan" && $founddefaultgw == false) || $setdefaultgw == true){
+ $setdefaultgw = true;
$mpdconf .= <<<EOD
set iface route default
EOD;
-*/
-
+ }
$mpdconf .= <<<EOD
set iface {$ondemand} on-demand
set iface idle {$ppp['idletimeout']}
@@ -1201,7 +1196,7 @@ EOD;
EOD;
- if (isset($config['system']['dnsallowoverride']) && isset($ppp['defaultgw']))
+ if (isset($config['system']['dnsallowoverride']) && $setdefaultgw == true)
$mpdconf .= <<<EOD
set ipcp enable req-pri-dns
set ipcp enable req-sec-dns
diff --git a/usr/local/www/interfaces_ppps_edit.php b/usr/local/www/interfaces_ppps_edit.php
index f9cd4ef..56a11f9 100644
--- a/usr/local/www/interfaces_ppps_edit.php
+++ b/usr/local/www/interfaces_ppps_edit.php
@@ -80,8 +80,6 @@ if (isset($id) && $a_ppps[$id]) {
$pconfig['interfaces'] = $a_ppps[$id]['ports'];
$pconfig['username'] = $a_ppps[$id]['username'];
$pconfig['password'] = base64_decode($a_ppps[$id]['password']);
- if (isset($a_ppps[$id]['defaultgw']))
- $pconfig['defaultgw'] = true;
if (isset($a_ppps[$id]['ondemand']))
$pconfig['ondemand'] = true;
$pconfig['idletimeout'] = $a_ppps[$id]['idletimeout'];
@@ -273,7 +271,6 @@ if ($_POST) {
$ppp['ports'] = implode(',',$_POST['interfaces']);
$ppp['username'] = $_POST['username'];
$ppp['password'] = base64_encode($_POST['password']);
- $ppp['defaultgw'] = $_POST['defaultgw'] ? true : false;
$ppp['ondemand'] = $_POST['ondemand'] ? true : false;
if (!empty($_POST['idletimeout']))
$ppp['idletimeout'] = $_POST['idletimeout'];
@@ -608,13 +605,7 @@ $types = array("select" => "Select", "ppp" => "PPP", "pppoe" => "PPPoE", "pptp"
<input name="password" type="password" class="formfld pwd" id="password" size="20" value="<?=htmlspecialchars($pconfig['password']);?>">
</td>
</tr>
- <tr>
- <td width="22%" valign="top" class="vncell"><?= gettext("Gateway"); ?></td>
- <td width="78%" class="vtable">
- <input type="checkbox" value="on" id="defaultgw" name="defaultgw" <?php if (isset($pconfig['defaultgw'])) echo "checked"; ?>><?= gettext("This link will be used as the default gateway."); ?>
- <br/><span class="vexpl"><?= gettext("\"Allow DNS Server list to be overridden\" must also be checked in the System -> General Setup menu."); ?>
- </td>
- </tr>
+
<tr>
<td valign="top" class="vncell"><?= gettext("Dial On Demand"); ?></td>
<td class="vtable">
OpenPOWER on IntegriCloud