diff options
author | Chris Buechler <cmb@pfsense.org> | 2016-06-21 19:39:31 -0500 |
---|---|---|
committer | Chris Buechler <cmb@pfsense.org> | 2016-06-21 19:40:27 -0500 |
commit | 6fd9645ef3296d4da4c9aacbda8c81065cc42ce0 (patch) | |
tree | 06742bed951b699a1dde4647b1580fa64220b132 /src/etc/inc/interfaces.inc | |
parent | a5dee45b1a1e76a62862615e7b9607c01af2895f (diff) | |
download | pfsense-6fd9645ef3296d4da4c9aacbda8c81065cc42ce0.zip pfsense-6fd9645ef3296d4da4c9aacbda8c81065cc42ce0.tar.gz |
Only call interfaces_vips_configure once if it's needed, rather than doing the same thing over and over for every VIP on an interface. Ticket #6515
Diffstat (limited to 'src/etc/inc/interfaces.inc')
-rw-r--r-- | src/etc/inc/interfaces.inc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/etc/inc/interfaces.inc b/src/etc/inc/interfaces.inc index ad3050c..8fa48fc 100644 --- a/src/etc/inc/interfaces.inc +++ b/src/etc/inc/interfaces.inc @@ -5062,6 +5062,7 @@ function link_interface_to_vlans($int, $action = "") { function link_interface_to_vips($int, $action = "", $vhid = '') { global $config; + $updatevips = false; if (is_array($config['virtualip']['vip'])) { $result = array(); foreach ($config['virtualip']['vip'] as $vip) { @@ -5074,7 +5075,7 @@ function link_interface_to_vips($int, $action = "", $vhid = '') { continue; } if ($action == "update") { - interfaces_vips_configure($int); + $updatevips = true; } else { if (empty($vhid) || ($vhid == $vip['vhid']) || substr($vip['interface'], 0, 4) == "_vip") { @@ -5082,6 +5083,9 @@ function link_interface_to_vips($int, $action = "", $vhid = '') { } } } + if ($updatevips === true) { + interfaces_vips_configure($int); + } return $result; } |