summaryrefslogtreecommitdiffstats
path: root/etc/rc.filter_synchronize
diff options
context:
space:
mode:
authorErmal Luçi <eri@pfsense.org>2009-05-22 17:08:43 +0000
committerErmal Luçi <eri@pfsense.org>2009-05-22 17:08:43 +0000
commit35e4f68e3c5919f8e85d6febcc01b22de1155da2 (patch)
tree583908bc30fef8f413047f88435b94b3cc16bf1a /etc/rc.filter_synchronize
parentd3b6dd4caf766cddf08cbc35ebdaaab1bdb5e0d3 (diff)
downloadpfsense-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_synchronize23
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);
OpenPOWER on IntegriCloud