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:29 -0500 |
commit | 33e71f1087e1885eae9393626a331147eca5c7c7 (patch) | |
tree | 5f8a7855ab5d9026c5df1019b1135a2686586c83 /etc/inc/gwlb.inc | |
parent | e924cd7eb2457e7fd7122aecc1f2887824229edb (diff) | |
download | pfsense-33e71f1087e1885eae9393626a331147eca5c7c7.zip pfsense-33e71f1087e1885eae9393626a331147eca5c7c7.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']; } |