diff --git a/src/etc/inc/gwlb.inc b/src/etc/inc/gwlb.inc index 0b803217dd..8a200bad03 100644 --- a/src/etc/inc/gwlb.inc +++ b/src/etc/inc/gwlb.inc @@ -671,11 +671,11 @@ function return_gateways_array($disabled = false, $localhost = false, $inactive } if ($gateway['ipprotocol'] == "inet" && - ($config['gateways']['defaultgw4'] == $gateway['name'] || $gateway['gateway'] == $cgw4)) { + ($gateway['gateway'] == $cgw4)) { $gateway['isdefaultgw'] = true; $found_defaultv4 = 1; } else if ($gateway['ipprotocol'] == "inet6" && - ($config['gateways']['defaultgw6'] == $gateway['name'] || $gateway['gateway'] == $cgw6)) { + ($gateway['gateway'] == $cgw6)) { $gateway['isdefaultgw'] = true; $found_defaultv6 = 1; } diff --git a/src/usr/local/www/system_gateways.php b/src/usr/local/www/system_gateways.php index 9fc4b094ef..7631385930 100644 --- a/src/usr/local/www/system_gateways.php +++ b/src/usr/local/www/system_gateways.php @@ -65,8 +65,6 @@ if ($_POST['order-store']) { write_config("System - Gateways: save default gateway"); } -$a_gateways = return_gateways_array(true, false, true, true); - if ($_POST['apply']) { $retval = 0; @@ -84,6 +82,7 @@ if ($_POST['apply']) { } } +$a_gateways = return_gateways_array(true, false, true, true); function can_delete_disable_gateway_item($id, $disable = false) { global $config, $input_errors, $a_gateways; @@ -343,7 +342,7 @@ foreach ($a_gateways as $i => $gateway): (default)"; + echo ' '; } ?> @@ -445,6 +444,13 @@ $form->add($section); print $form; ?> +
+', '', '') + ); +?> +