diff options
-rw-r--r-- | etc/inc/interfaces.inc | 15 | ||||
-rw-r--r-- | usr/local/www/interfaces_ppps_edit.php | 11 |
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"> |