summaryrefslogtreecommitdiffstats
path: root/usr
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2006-07-24 19:48:04 +0000
committerScott Ullrich <sullrich@pfsense.org>2006-07-24 19:48:04 +0000
commit8bddc5b7837cd28c6a648dea0ff00550356aa571 (patch)
tree233a7ace4c3f4a902ec575e81776bef127afc18e /usr
parentee968e4f29df3684e76be1d07ad6f67e48ffe6a4 (diff)
downloadpfsense-8bddc5b7837cd28c6a648dea0ff00550356aa571.zip
pfsense-8bddc5b7837cd28c6a648dea0ff00550356aa571.tar.gz
Also check policy based routing and see if the gateway is in use.
Diffstat (limited to 'usr')
-rwxr-xr-xusr/local/www/interfaces.php12
-rwxr-xr-xusr/local/www/interfaces_opt.php12
-rwxr-xr-xusr/local/www/interfaces_wan.php12
3 files changed, 30 insertions, 6 deletions
diff --git a/usr/local/www/interfaces.php b/usr/local/www/interfaces.php
index b80fa57..f9d8363 100755
--- a/usr/local/www/interfaces.php
+++ b/usr/local/www/interfaces.php
@@ -99,11 +99,19 @@ if ($_POST) {
if($lbpool['type'] == "gateway") {
foreach ((array) $lbpool['servers'] as $server) {
$svr = split("\|", $server);
- if($svr[1] == $_POST['gateway'])
+ if($svr[1] == $pconfig['gateway']) {
+ $_POST['gateway'] = $pconfig['gateway'];
$input_errors[] = "Cannot change {$svr[1]} gateway. It is currently referenced by the load balancer pools.";
+ }
}
}
- }
+ }
+ foreach($config['filter']['rule'] as $rule) {
+ if($rule['gateway'] == $pconfig['gateway']) {
+ $_POST['gateway'] = $pconfig['gateway'];
+ $input_errors[] = "Cannot change {$svr[1]} gateway. It is currently referenced by the filter rules via policy based routing.";
+ }
+ }
}
}
diff --git a/usr/local/www/interfaces_opt.php b/usr/local/www/interfaces_opt.php
index 92a96df..3e5f445 100755
--- a/usr/local/www/interfaces_opt.php
+++ b/usr/local/www/interfaces_opt.php
@@ -90,11 +90,19 @@ if ($_POST) {
if($lbpool['type'] == "gateway") {
foreach ((array) $lbpool['servers'] as $server) {
$svr = split("\|", $server);
- if($svr[1] == $_POST['gateway'])
+ if($svr[1] == $pconfig['gateway']) {
+ $_POST['gateway'] = $pconfig['gateway'];
$input_errors[] = "Cannot change {$svr[1]} gateway. It is currently referenced by the load balancer pools.";
+ }
}
}
- }
+ }
+ foreach($config['filter']['rule'] as $rule) {
+ if($rule['gateway'] == $pconfig['gateway']) {
+ $_POST['gateway'] = $pconfig['gateway'];
+ $input_errors[] = "Cannot change {$svr[1]} gateway. It is currently referenced by the filter rules via policy based routing.";
+ }
+ }
}
}
diff --git a/usr/local/www/interfaces_wan.php b/usr/local/www/interfaces_wan.php
index b80fa57..f9d8363 100755
--- a/usr/local/www/interfaces_wan.php
+++ b/usr/local/www/interfaces_wan.php
@@ -99,11 +99,19 @@ if ($_POST) {
if($lbpool['type'] == "gateway") {
foreach ((array) $lbpool['servers'] as $server) {
$svr = split("\|", $server);
- if($svr[1] == $_POST['gateway'])
+ if($svr[1] == $pconfig['gateway']) {
+ $_POST['gateway'] = $pconfig['gateway'];
$input_errors[] = "Cannot change {$svr[1]} gateway. It is currently referenced by the load balancer pools.";
+ }
}
}
- }
+ }
+ foreach($config['filter']['rule'] as $rule) {
+ if($rule['gateway'] == $pconfig['gateway']) {
+ $_POST['gateway'] = $pconfig['gateway'];
+ $input_errors[] = "Cannot change {$svr[1]} gateway. It is currently referenced by the filter rules via policy based routing.";
+ }
+ }
}
}
OpenPOWER on IntegriCloud