diff options
author | Ermal <eri@pfsense.org> | 2013-09-03 16:52:07 +0000 |
---|---|---|
committer | Ermal <eri@pfsense.org> | 2013-09-03 16:52:43 +0000 |
commit | 32a9eb1873d67ae581ba084ee9fcbf079215ecce (patch) | |
tree | 75ee87c37f2863a8b02879da829f0d8d5b48fe39 /usr/local/www/system_gateways.php | |
parent | 243680e54daea3fa26134450f5be8277e25e091a (diff) | |
download | pfsense-32a9eb1873d67ae581ba084ee9fcbf079215ecce.zip pfsense-32a9eb1873d67ae581ba084ee9fcbf079215ecce.tar.gz |
Bring back static routes to fix issues reported on Ticext #3179
Diffstat (limited to 'usr/local/www/system_gateways.php')
-rwxr-xr-x | usr/local/www/system_gateways.php | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/usr/local/www/system_gateways.php b/usr/local/www/system_gateways.php index 016ed45..5fdec7f 100755 --- a/usr/local/www/system_gateways.php +++ b/usr/local/www/system_gateways.php @@ -104,6 +104,15 @@ if ($_GET['act'] == "del") { } } if ($remove == true) { + /* NOTE: Cleanup static routes for the monitor ip if any */ + if (!empty($a_gateways[$_GET['id']]['monitor']) && $a_gateways[$_GET['id']]['monitor'] != "dynamic" && is_ipaddr($a_gateways[$_GET['id']]['monitor']) && + $a_gateways[$_GET['id']]['monitor'] != $a_gateways[$_GET['id']]['monitor'] && $a_gateways[$_GET['id']]['gateway'] != $a_gateways[$_GET['id']]['monitor']) { + if (is_ipaddrv4($a_gateways[$_GET['id']]['monitor'])) + mwexec("/sbin/route delete " . escapeshellarg($a_gateways[$_GET['id']]['monitor'])); + else + mwexec("/sbin/route delete -inet6 " . escapeshellarg($a_gateways[$_GET['id']]['monitor'])); + } + 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}"; |