mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Ticket #304. Fix bogus dynamic entries in system->gateways after deleting gateways.
This commit is contained in:
parent
2eac3af461
commit
83f9c8ee5e
@ -303,7 +303,7 @@ function return_gateways_array($disabled = false) {
|
||||
$gateway['attribute'] = "system";
|
||||
|
||||
/* Loopback dummy for dynamic interfaces without a IP */
|
||||
if(!is_ipaddr(trim($gateway['gateway']))) {
|
||||
if(!is_ipaddr(trim($gateway['gateway'])) && $gateway['dynamic'] == true) {
|
||||
$gateway['gateway'] = "dynamic";
|
||||
}
|
||||
|
||||
@ -520,7 +520,7 @@ function get_interface_gateway($interface, &$dynamic = false) {
|
||||
$gw = lookup_gateway_ip_by_name($gwcfg['gateway']);
|
||||
|
||||
// for dynamic interfaces we handle them through the $interface_router file.
|
||||
if (!is_ipaddr($gw)) {
|
||||
if (!is_ipaddr($gw) && !is_ipaddr($gwcfg['ipaddr'])) {
|
||||
$realif = get_real_interface($interface);
|
||||
if (file_exists("{$g['tmp_path']}/{$realif}_router")) {
|
||||
$gw = file_get_contents("{$g['tmp_path']}/{$realif}_router");
|
||||
|
||||
Loading…
Reference in New Issue
Block a user