diff options
author | Ermal <eri@pfsense.org> | 2010-10-02 07:14:59 +0000 |
---|---|---|
committer | Ermal <eri@pfsense.org> | 2010-10-02 07:14:59 +0000 |
commit | a531d6875a12558638ceb90666dbc7402e42b087 (patch) | |
tree | 855f4de4f27e1d2a8a05567bc997d8c50d0eaf1e /usr | |
parent | 318baca5f6658f52c0b895fdb8f42bc276e26a6d (diff) | |
download | pfsense-a531d6875a12558638ceb90666dbc7402e42b087.zip pfsense-a531d6875a12558638ceb90666dbc7402e42b087.tar.gz |
This breaks the code because the ASSUMPTION is to reload the gateway interface that was a defaultgw previously and not the interface that just became defaultgw. Mostly for dynamic connections like dhcp/ppp*
Pointy-hat: gnhb
Revert "Update code to actually accomplish the intended behavior of NOT reloading the interface"
This reverts commit 318baca5f6658f52c0b895fdb8f42bc276e26a6d.
Diffstat (limited to 'usr')
-rwxr-xr-x | usr/local/www/system_gateways_edit.php | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/usr/local/www/system_gateways_edit.php b/usr/local/www/system_gateways_edit.php index a790db9..d1fcd30 100755 --- a/usr/local/www/system_gateways_edit.php +++ b/usr/local/www/system_gateways_edit.php @@ -197,6 +197,7 @@ if ($_POST) { if (!$input_errors) { if (!(($_POST['weight'] && $_POST['weight'] > 1) || $_POST['latencylow'] || $_POST['latencyhigh'] || $_POST['losslow'] || $_POST['losshigh'] || $_POST['down'] || + ($_POST['defaultgw'] && !$pconfig['defaultgw']) || (!$_POST['defaultgw'] && $pconfig['defaultgw']) || (empty($_POST['monitor']) || (!empty($_POST['gateway']) && $_POST['gateway'] != "dynamic")) || (empty($_POST['monitor']) || (!empty($_POST['monitor']) && $_POST['monitor'] != "dynamic")))) { if (isset($id) && $a_gateway_item[$id]) @@ -225,15 +226,11 @@ if ($_POST) { $gateway['monitor'] = $_POST['monitor']; if ($_POST['defaultgw'] == "yes" || $_POST['defaultgw'] == "on") { - $reloadif = true; $i = 0; - foreach($a_gateway_item as $gw_item_id => $gw) { + foreach($a_gateway_item as $gw) { unset($config['gateways']['gateway_item'][$i]['defaultgw']); - /* if true $gw is the *saved* gateway config data and - * we don't need to reload if this GW interface didn't change AND this GW was already default */ - if (isset($id) && $gw_item_id == $id) - if ($gw['interface'] == $_POST['interface'] && isset($gw['defaultgw']) ) - $reloadif = false; + if ($gw['interface'] != $_POST['interface']) + $reloadif = true; $i++; } $gateway['defaultgw'] = true; |