diff options
author | Seth Mos <seth.mos@dds.nl> | 2011-03-16 10:03:29 +0100 |
---|---|---|
committer | Seth Mos <seth.mos@dds.nl> | 2011-03-16 10:03:29 +0100 |
commit | bfc0cb5b6af67cda4c29580ad9fe51c9cda197e5 (patch) | |
tree | 3d63c281f8161a77e12ce8144a05d3f8fab57f81 /etc/inc/upgrade_config.inc | |
parent | 85071ea22b22b70b1d3955cf131e4646cf3d818c (diff) | |
parent | 323f3f9c17d9307ab9eb820cbd05cc7629ce80b9 (diff) | |
download | pfsense-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.inc | 9 |
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']}"; |