summaryrefslogtreecommitdiffstats
path: root/etc/inc/upgrade_config.inc
diff options
context:
space:
mode:
authorSeth Mos <seth.mos@dds.nl>2011-03-16 10:03:29 +0100
committerSeth Mos <seth.mos@dds.nl>2011-03-16 10:03:29 +0100
commitbfc0cb5b6af67cda4c29580ad9fe51c9cda197e5 (patch)
tree3d63c281f8161a77e12ce8144a05d3f8fab57f81 /etc/inc/upgrade_config.inc
parent85071ea22b22b70b1d3955cf131e4646cf3d818c (diff)
parent323f3f9c17d9307ab9eb820cbd05cc7629ce80b9 (diff)
downloadpfsense-bfc0cb5b6af67cda4c29580ad9fe51c9cda197e5.zip
pfsense-bfc0cb5b6af67cda4c29580ad9fe51c9cda197e5.tar.gz
Merge remote branch 'upstream/master'
Diffstat (limited to 'etc/inc/upgrade_config.inc')
-rw-r--r--etc/inc/upgrade_config.inc9
1 files changed, 8 insertions, 1 deletions
diff --git a/etc/inc/upgrade_config.inc b/etc/inc/upgrade_config.inc
index 0177461..1e1fe13 100644
--- a/etc/inc/upgrade_config.inc
+++ b/etc/inc/upgrade_config.inc
@@ -790,6 +790,7 @@ function upgrade_043_to_044() {
$gateways = return_gateways_array(true);
$i = 0;
if (is_array($config['staticroutes']['route'])) {
+ $gwmap = array();
foreach ($config['staticroutes']['route'] as $idx => $sroute) {
$found = false;
foreach ($gateways as $gwname => $gw) {
@@ -799,9 +800,15 @@ function upgrade_043_to_044() {
break;
}
}
+ if($gwmap[$sroute['gateway']]) {
+ /* We already added a gateway name for this IP */
+ $config['staticroutes']['route'][$idx]['gateway'] = "{$gwmap[$sroute['gateway']]}";
+ $found = true;
+ }
if ($found == false) {
$gateway = array();
- $gateway['name'] = "SROUTE{$i}";
+ $gateway['name'] = "SROUTE{$i}";
+ $gwmap[$sroute['gateway']] = $gateway['name'];
$gateway['gateway'] = $sroute['gateway'];
$gateway['interface'] = $sroute['interface'];
$gateway['descr'] = "Upgraded static route for {$sroute['network']}";
OpenPOWER on IntegriCloud