summaryrefslogtreecommitdiffstats
path: root/usr/local/www/system_gateways_edit.php
diff options
context:
space:
mode:
authorErmal <eri@pfsense.org>2010-10-02 07:29:11 +0000
committerErmal <eri@pfsense.org>2010-10-02 07:29:11 +0000
commitc6865c5ec250d04648f344190f7cfdf4ddb40046 (patch)
treec4579d01a983e4b1be00e9275efd14e0832c8a29 /usr/local/www/system_gateways_edit.php
parenta531d6875a12558638ceb90666dbc7402e42b087 (diff)
downloadpfsense-c6865c5ec250d04648f344190f7cfdf4ddb40046.zip
pfsense-c6865c5ec250d04648f344190f7cfdf4ddb40046.tar.gz
Fix intended behaviour when the default gateway changes interface.
Diffstat (limited to 'usr/local/www/system_gateways_edit.php')
-rwxr-xr-xusr/local/www/system_gateways_edit.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/usr/local/www/system_gateways_edit.php b/usr/local/www/system_gateways_edit.php
index d1fcd30..dfd703b 100755
--- a/usr/local/www/system_gateways_edit.php
+++ b/usr/local/www/system_gateways_edit.php
@@ -208,7 +208,7 @@ if ($_POST) {
}
- $reloadif = false;
+ $reloadif = "";
$gateway = array();
if (empty($_POST['interface']))
@@ -229,8 +229,8 @@ if ($_POST) {
$i = 0;
foreach($a_gateway_item as $gw) {
unset($config['gateways']['gateway_item'][$i]['defaultgw']);
- if ($gw['interface'] != $_POST['interface'])
- $reloadif = true;
+ if ($gw['interface'] != $_POST['interface'] && $gw['defaultgw'])
+ $reloadif = $gw['interface'];
$i++;
}
$gateway['defaultgw'] = true;
@@ -260,8 +260,8 @@ if ($_POST) {
if($_REQUEST['isAjax']) {
echo $_POST['name'];
exit;
- } else if ($reloadif == true)
- send_event("interface reconfigure {$_POST['interface']}");
+ } else if (!empty($reloadif))
+ send_event("interface reconfigure {$reloadif}");
header("Location: system_gateways.php");
exit;
OpenPOWER on IntegriCloud