summaryrefslogtreecommitdiffstats
path: root/usr/local/www/system_routes.php
diff options
context:
space:
mode:
authorErmal <eri@pfsense.org>2013-01-24 11:19:53 +0000
committerErmal <eri@pfsense.org>2013-01-24 11:19:53 +0000
commit9c115b409d0b21132dae9ad2c62f842a7e438f8f (patch)
tree446c4b8740bdf4d79fde3ae0b4adb4d477abe454 /usr/local/www/system_routes.php
parentc37e2460557886afa663e373d74d75f2c4873d82 (diff)
downloadpfsense-9c115b409d0b21132dae9ad2c62f842a7e438f8f.zip
pfsense-9c115b409d0b21132dae9ad2c62f842a7e438f8f.tar.gz
Fixes #804. Correct deletion of ipv6 routes.
Diffstat (limited to 'usr/local/www/system_routes.php')
-rwxr-xr-xusr/local/www/system_routes.php17
1 files changed, 10 insertions, 7 deletions
diff --git a/usr/local/www/system_routes.php b/usr/local/www/system_routes.php
index 70f251d..5b84b1c 100755
--- a/usr/local/www/system_routes.php
+++ b/usr/local/www/system_routes.php
@@ -81,13 +81,16 @@ if ($_POST) {
if ($_GET['act'] == "del") {
if ($a_routes[$_GET['id']]) {
$changedesc .= gettext("removed route to") . " " . $a_routes[$_GET['id']['route']];
- if(is_ipaddrv6($a_routes[$_GET['id']]['network']))
- $family = "-inet6";
- mwexec("/sbin/route delete {$family} " . escapeshellarg($a_routes[$_GET['id']]['network']));
- unset($a_routes[$_GET['id']]);
- write_config($changedesc);
- header("Location: system_routes.php");
- exit;
+ list($ip, $mask) = explode("/", $a_routes[$_GET['id']]['network']);
+ if (is_ipaddr($ip)) {
+ if(is_ipaddrv6($ip))
+ $family = "-inet6";
+ mwexec("/sbin/route delete {$family} " . escapeshellarg($a_routes[$_GET['id']]['network']));
+ unset($a_routes[$_GET['id']]);
+ write_config($changedesc);
+ header("Location: system_routes.php");
+ exit;
+ }
}
}
OpenPOWER on IntegriCloud