diff options
-rwxr-xr-x | etc/rc.filter_synchronize | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/etc/rc.filter_synchronize b/etc/rc.filter_synchronize index 46bd66a..cf221bf 100755 --- a/etc/rc.filter_synchronize +++ b/etc/rc.filter_synchronize @@ -49,11 +49,14 @@ require_once("interfaces.inc"); */ function backup_vip_config_section() { global $config; - $new_section = &$config['virtualip']; - foreach($new_section['vip'] as $section) { - if($section['mode'] == "proxyarp" || $section['mode'] == "ipalias") { - unset($section); - } + + if (is_array($config['virtualip']['vip'])) + return; + $temp = array(); + $temp['vip'] = array(); + foreach($config['virtualip']['vip'] as $section) { + if($section['mode'] == "proxyarp" || $section['mode'] == "ipalias") + continue; if($section['advskew'] <> "") { $section_val = intval($section['advskew']); $section_val=$section_val+100; |