diff options
author | jim-p <jimp@pfsense.org> | 2013-11-20 15:55:12 -0500 |
---|---|---|
committer | jim-p <jimp@pfsense.org> | 2013-11-20 15:56:42 -0500 |
commit | 186ab4ea1ae72495d52038b08ba118014b3abfab (patch) | |
tree | ba8036af6abcd2536756029e2753d0935ca98e21 /etc/inc/gwlb.inc | |
parent | 58fac6951c14b9fef3f4ed6b0bf6a884ffedf2fc (diff) | |
download | pfsense-186ab4ea1ae72495d52038b08ba118014b3abfab.zip pfsense-186ab4ea1ae72495d52038b08ba118014b3abfab.tar.gz |
Don't flush interface cache on each call of the function when looping through all gateways.
Diffstat (limited to 'etc/inc/gwlb.inc')
-rw-r--r-- | etc/inc/gwlb.inc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/etc/inc/gwlb.inc b/etc/inc/gwlb.inc index 012b288..da339ce 100644 --- a/etc/inc/gwlb.inc +++ b/etc/inc/gwlb.inc @@ -367,6 +367,8 @@ function return_gateways_array($disabled = false, $localhost = false) { $found_defaultv4 = 0; $found_defaultv6 = 0; + // Ensure the interface cache is up to date first + $interfaces = get_interface_arr(true); $interfaces_v4 = array(); $interfaces_v6 = array(); @@ -422,10 +424,10 @@ function return_gateways_array($disabled = false, $localhost = false) { /* special treatment for tunnel interfaces */ if ($gateway['ipprotocol'] == "inet6") { - $gateway['interface'] = get_real_interface($gateway['interface'], "inet6"); + $gateway['interface'] = get_real_interface($gateway['interface'], "inet6", false, false); $interfaces_v6[$gateway['friendlyiface']] = $gateway['friendlyiface']; } else { - $gateway['interface'] = get_real_interface($gateway['interface']); + $gateway['interface'] = get_real_interface($gateway['interface'], "all", false, false); $interfaces_v4[$gateway['friendlyiface']] = $gateway['friendlyiface']; } |