summaryrefslogtreecommitdiffstats
path: root/src/etc/inc/upgrade_config.inc
diff options
context:
space:
mode:
authorChris Buechler <cmb@pfsense.org>2016-01-25 18:22:03 -0600
committerChris Buechler <cmb@pfsense.org>2016-01-25 18:22:03 -0600
commita34c263bef2152eb4bc5dd27c8393a7fdb27b4fb (patch)
treeecbb3bbd6e19a1c1cf7a2335bf5694036d22bc87 /src/etc/inc/upgrade_config.inc
parent3756fd860385c98a890e3b8315bf50448095c3bb (diff)
downloadpfsense-a34c263bef2152eb4bc5dd27c8393a7fdb27b4fb.zip
pfsense-a34c263bef2152eb4bc5dd27c8393a7fdb27b4fb.tar.gz
Add uniqid tag to CARP VIPs that don't have one upon upgrade. Ticket #4858
Diffstat (limited to 'src/etc/inc/upgrade_config.inc')
-rw-r--r--src/etc/inc/upgrade_config.inc14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/etc/inc/upgrade_config.inc b/src/etc/inc/upgrade_config.inc
index 5a5425d..11baf48 100644
--- a/src/etc/inc/upgrade_config.inc
+++ b/src/etc/inc/upgrade_config.inc
@@ -4337,4 +4337,18 @@ function upgrade_138_to_139() {
}
}
+function upgrade_139_to_140() {
+ global $config;
+
+ if (is_array($config['virtualip']['vip'])) {
+ foreach ($config['virtualip']['vip'] as $idx => $vip) {
+ if ($vip['mode'] == "carp") {
+ if (!isset($vip['uniqid'])) {
+ $config['virtualip']['vip'][$idx]['uniqid'] = uniqid();
+ }
+ }
+ }
+ }
+}
+
?>
OpenPOWER on IntegriCloud