Compare against $pconfig and only check items if gateway is changing.

This commit is contained in:
Scott Ullrich 2006-07-24 19:42:38 +00:00
parent de42a08e05
commit ee968e4f29
3 changed files with 5 additions and 5 deletions

View File

@ -92,7 +92,7 @@ if ($_POST) {
unset($input_errors);
$pconfig = $_POST;
if($_POST['gateway']) {
if($_POST['gateway'] and $pconfig['gateway'] <> $_POST['gateway']) {
/* enumerate slbd gateways and make sure we are not creating a route loop */
if(is_array($config['load_balancer']['lbpool'])) {
foreach($config['load_balancer']['lbpool'] as $lbpool) {

View File

@ -83,9 +83,7 @@ if ($_POST) {
/* filter out spaces from descriptions */
$POST['descr'] = remove_bad_chars($POST['descr']);
$pconfig = $_POST;
if($_POST['gateway']) {
if($_POST['gateway'] and $pconfig['gateway'] <> $_POST['gateway']) {
/* enumerate slbd gateways and make sure we are not creating a route loop */
if(is_array($config['load_balancer']['lbpool'])) {
foreach($config['load_balancer']['lbpool'] as $lbpool) {
@ -100,6 +98,8 @@ if ($_POST) {
}
}
$pconfig = $_POST;
/* input validation */
if ($_POST['enable']) {

View File

@ -92,7 +92,7 @@ if ($_POST) {
unset($input_errors);
$pconfig = $_POST;
if($_POST['gateway']) {
if($_POST['gateway'] and $pconfig['gateway'] <> $_POST['gateway']) {
/* enumerate slbd gateways and make sure we are not creating a route loop */
if(is_array($config['load_balancer']['lbpool'])) {
foreach($config['load_balancer']['lbpool'] as $lbpool) {