diff options
author | sullrich <sullrich@pfsense.org> | 2009-12-07 21:08:32 -0500 |
---|---|---|
committer | sullrich <sullrich@pfsense.org> | 2009-12-07 21:09:23 -0500 |
commit | b5e8ddeeef9ca32cda3d6f3cc4ed9f685af9fd2e (patch) | |
tree | ae0f98f0b9b10b82c1927410ed6111c0f29c3c5c /etc/inc/upgrade_config.inc | |
parent | 166c82edeacbea6a2b7c89482d6b7303ef029b10 (diff) | |
download | pfsense-b5e8ddeeef9ca32cda3d6f3cc4ed9f685af9fd2e.zip pfsense-b5e8ddeeef9ca32cda3d6f3cc4ed9f685af9fd2e.tar.gz |
Upgrade outgoing load balancing to gateway groups. Ticket #78
Diffstat (limited to 'etc/inc/upgrade_config.inc')
-rw-r--r-- | etc/inc/upgrade_config.inc | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/etc/inc/upgrade_config.inc b/etc/inc/upgrade_config.inc index 0c04e60..665eb47 100644 --- a/etc/inc/upgrade_config.inc +++ b/etc/inc/upgrade_config.inc @@ -796,6 +796,7 @@ function upgrade_045_to_046() { if (is_array($config['load_balancer']['virtual_server']) && count($config['load_balancer']['virtual_server'])) { $vs_a = &$config['load_balancer']['virtual_server']; $pool_a = &$config['load_balancer']['lbpool']; + $new_gateways = &$config['gateways']['gateway_group']; $pools = array(); /* Index pools by name */ if(is_array($pool_a)) { @@ -822,6 +823,21 @@ function upgrade_045_to_046() { } } } + foreach($config['load_balancer']['lbpool'] as $lbpool) { + if($lbpool['type'] == "gateway") { + $new_lbpool = array(); + $new_lbpool['name'] = $lbpool['name']; + $new_lbpool['descr'] = $lbpool['desc']; + $new_lbpool['trigger'] = "downlosslatency"; + $new_lbpool['item'] = array(); + foreach($lbpool['servers'] as $server) { + $server_split = split("\|", $server); + $new_lbpool['item'][] = $server_split[0] . "|" . "1"; + } + $new_gateways[] = $new_lbpool; + unset($new_lbpool); + } + } if(count($config['load_balancer']) == 0) { unset($config['load_balancer']); } @@ -1787,4 +1803,4 @@ function upgrade_059_to_060() { } } -?> +?>
\ No newline at end of file |