summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorErmal <eri@pfsense.org>2010-04-14 13:18:15 +0000
committerErmal <eri@pfsense.org>2010-04-14 13:18:15 +0000
commit6364b88b0b77f5adbcd1a93e7da04f5f6516c5f6 (patch)
tree1cb79337de3b1cbdf4773a54e7e8e88571c1715c
parent5ac2f583757d632ffe99404f0027e362685ef7bb (diff)
downloadpfsense-6364b88b0b77f5adbcd1a93e7da04f5f6516c5f6.zip
pfsense-6364b88b0b77f5adbcd1a93e7da04f5f6516c5f6.tar.gz
Ticket #486. Convert even the gateways that specify the interface itself.
-rw-r--r--etc/inc/upgrade_config.inc7
1 files changed, 5 insertions, 2 deletions
diff --git a/etc/inc/upgrade_config.inc b/etc/inc/upgrade_config.inc
index e3a650f..da8594a 100644
--- a/etc/inc/upgrade_config.inc
+++ b/etc/inc/upgrade_config.inc
@@ -785,8 +785,11 @@ function upgrade_042_to_043() {
/* Update all filter rules which might reference this gateway */
$j = 0;
foreach($config['filter']['rule'] as $rule) {
- if(is_ipaddr($rule['gateway']) && ($rule['gateway'] == $config['gateways']['gateway_item'][$i]['gateway'])) {
- $config['filter']['rule'][$j]['gateway'] = $config['gateways']['gateway_item'][$i]['name'];
+ if(is_ipaddr($rule['gateway'])) {
+ if ($rule['gateway'] == $config['gateways']['gateway_item'][$i]['gateway'])
+ $config['filter']['rule'][$j]['gateway'] = $config['gateways']['gateway_item'][$i]['name'];
+ else if ($rule['gateway'] == $ifname)
+ $config['filter']['rule'][$j]['gateway'] = $config['gateways']['gateway_item'][$i]['name'];
}
$j++;
}
OpenPOWER on IntegriCloud