Revision e99ba2d6
Added by Renato Botelho over 12 years ago
etc/inc/upgrade_config.inc | ||
---|---|---|
2965 | 2965 |
} |
2966 | 2966 |
} |
2967 | 2967 |
} |
2968 |
|
|
2969 |
function upgrade_091_to_092() { |
|
2970 |
global $config; |
|
2971 |
|
|
2972 |
if (is_array($config['nat']['advancedoutbound']) && is_array($config['nat']['advancedoutbound']['rule'])) { |
|
2973 |
$nat_rules = &$config['nat']['advancedoutbound']['rule']; |
|
2974 |
for ($i = 0; isset($nat_rules[$i]); $i++) { |
|
2975 |
if (empty($nat_rules[$i]['interface'])) { |
|
2976 |
$nat_rules[$i]['interface'] = 'wan'; |
|
2977 |
} |
|
2978 |
} |
|
2979 |
} |
|
2980 |
} |
|
2968 | 2981 |
?> |
Also available in: Unified diff
Fix outbound NAT rules when interface is deleted:
- When delete interface, do not touch outbound NAT rules
- Skip outbound NAT rules when interface doesn't exist
- Bump latest_config to 9.2
- Since rules with no interface were considered as wan, convert old
rules adding interface 'wan' to avoid breaking old configs
It should fix #2338