summaryrefslogtreecommitdiffstats
path: root/usr/local/www/system_gateways.php
diff options
context:
space:
mode:
authorErmal Luçi <eri@pfsense.org>2010-03-03 18:00:54 +0000
committerErmal Luçi <eri@pfsense.org>2010-03-03 18:00:54 +0000
commit9c6db17a5d3199bbb38956e1b213872eabca2091 (patch)
tree169154b8dda5ec44f044b575c64830aa027300e9 /usr/local/www/system_gateways.php
parent8cd27a9820ed658109fc415dcffb3cdfb05e066b (diff)
downloadpfsense-9c6db17a5d3199bbb38956e1b213872eabca2091.zip
pfsense-9c6db17a5d3199bbb38956e1b213872eabca2091.tar.gz
Remove the gateway even from the interface if it is used by it. Resolves #304.
Diffstat (limited to 'usr/local/www/system_gateways.php')
-rwxr-xr-xusr/local/www/system_gateways.php2
1 files changed, 2 insertions, 0 deletions
diff --git a/usr/local/www/system_gateways.php b/usr/local/www/system_gateways.php
index ef70f96..38df88a 100755
--- a/usr/local/www/system_gateways.php
+++ b/usr/local/www/system_gateways.php
@@ -82,6 +82,8 @@ if ($_GET['act'] == "del") {
/* remove the real entry */
$realid = $a_gateways[$_GET['id']]['attribute'];
+ if ($config['interfaces'][$a_gateways[$_GET['id']]['friendlyiface']]['gateway'] == $a_gateways[$_GET['id']]['name'])
+ unset($config['interfaces'][$a_gateways[$_GET['id']]['friendlyiface']]['gateway']);
$changedesc .= "removed gateway {$realid}";
unset($a_gateway_item[$realid]);
write_config($changedesc);
OpenPOWER on IntegriCloud