diff options
author | Ermal Luçi <eri@pfsense.org> | 2010-03-03 18:00:54 +0000 |
---|---|---|
committer | Ermal Luçi <eri@pfsense.org> | 2010-03-03 18:00:54 +0000 |
commit | 9c6db17a5d3199bbb38956e1b213872eabca2091 (patch) | |
tree | 169154b8dda5ec44f044b575c64830aa027300e9 | |
parent | 8cd27a9820ed658109fc415dcffb3cdfb05e066b (diff) | |
download | pfsense-9c6db17a5d3199bbb38956e1b213872eabca2091.zip pfsense-9c6db17a5d3199bbb38956e1b213872eabca2091.tar.gz |
Remove the gateway even from the interface if it is used by it. Resolves #304.
-rwxr-xr-x | usr/local/www/system_gateways.php | 2 |
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); |