diff options
author | Ermal Luçi <eri@pfsense.org> | 2009-05-22 17:08:43 +0000 |
---|---|---|
committer | Ermal Luçi <eri@pfsense.org> | 2009-05-22 17:08:43 +0000 |
commit | 35e4f68e3c5919f8e85d6febcc01b22de1155da2 (patch) | |
tree | 583908bc30fef8f413047f88435b94b3cc16bf1a /etc/rc.filter_synchronize | |
parent | d3b6dd4caf766cddf08cbc35ebdaaab1bdb5e0d3 (diff) | |
download | pfsense-35e4f68e3c5919f8e85d6febcc01b22de1155da2.zip pfsense-35e4f68e3c5919f8e85d6febcc01b22de1155da2.tar.gz |
Merge backup_vip_function to the synchronize code where its only used.
Diffstat (limited to 'etc/rc.filter_synchronize')
-rw-r--r-- | etc/rc.filter_synchronize | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/etc/rc.filter_synchronize b/etc/rc.filter_synchronize index 74acb3c..0459120 100644 --- a/etc/rc.filter_synchronize +++ b/etc/rc.filter_synchronize @@ -39,6 +39,29 @@ require_once("config.inc"); require_once("xmlrpc.inc"); +/* + * backup_vip_config_section($section): returns as an xml file string of + * the configuration section + */ +function backup_vip_config_section() { + global $config; + $new_section = &$config['virtualip']; + foreach($new_section['vip'] as $section) { + if($section['mode'] == "proxyarp") { + unset($section); + } + if($section['advskew'] <> "") { + $section_val = intval($section['advskew']); + $section_val=$section_val+100; + if($section_val > 255) + $section_val = 255; + $section['advskew'] = $section_val; + } + $temp['vip'][] = $section; + } + return $temp; +} + function remove_special_characters($string) { $match_array = ""; preg_match_all("/[a-zA-Z0-9\_\-]+/",$string,$match_array); |