diff options
author | Ermal <eri@pfsense.org> | 2010-10-27 20:55:09 +0000 |
---|---|---|
committer | Ermal <eri@pfsense.org> | 2010-10-27 20:56:58 +0000 |
commit | f48b6205465cf98bed02b0540e68a536b640f86e (patch) | |
tree | 0cd43243b61a91efc30f8dcfac82f1b42a941fbd /etc/rc.filter_synchronize | |
parent | a8200dbfe78171254fe059406784e0f94c0e625e (diff) | |
download | pfsense-f48b6205465cf98bed02b0540e68a536b640f86e.zip pfsense-f48b6205465cf98bed02b0540e68a536b640f86e.tar.gz |
Ticket #975. Properly initialize variables to avoid caching issues. Also check an array exists before trying to foreach to avoid errors.
Diffstat (limited to 'etc/rc.filter_synchronize')
-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; |