summaryrefslogtreecommitdiffstats
path: root/etc/inc
diff options
context:
space:
mode:
authorErmal Luçi <eri@pfsense.org>2009-05-13 18:14:16 +0000
committerErmal Luçi <eri@pfsense.org>2009-05-13 18:20:18 +0000
commitdfd7a44cab72d38a5c6385ca8ccfcdb189c6eff3 (patch)
treeb2fb39e0a79b4f496bac3ac6952ee9df1f18ed11 /etc/inc
parent43ea937c1864fd4d9df1b96ab5f8fab373db8018 (diff)
downloadpfsense-dfd7a44cab72d38a5c6385ca8ccfcdb189c6eff3.zip
pfsense-dfd7a44cab72d38a5c6385ca8ccfcdb189c6eff3.tar.gz
Fix the issue that the filter reload status stops at 'Syncing CARP data to {$url}'.
Which prevents syncing of configuration to hold. Actually the issue is just of checking if the config section exitst before trying to run count on it, since the later operation blocks and nothing gets synched. Probably a MFC should be done of this.
Diffstat (limited to 'etc/inc')
-rw-r--r--etc/inc/filter.inc7
1 files changed, 7 insertions, 0 deletions
diff --git a/etc/inc/filter.inc b/etc/inc/filter.inc
index 15e1647..7083930 100644
--- a/etc/inc/filter.inc
+++ b/etc/inc/filter.inc
@@ -2198,36 +2198,43 @@ function carp_sync_xml($url, $password, $sections, $port = 80, $method = 'pfsens
$config_copy = $config;
/* strip out nosync items */
+ if (is_array($config_copy['nat']['advancedoutbound']['rule']))
for ($x = 0; $x < count($config_copy['nat']['advancedoutbound']['rule']); $x++) {
if (isset ($config_copy['nat']['advancedoutbound']['rule'][$x]['nosync']))
unset ($config_copy['nat']['advancedoutbound']['rule'][$x]);
$config_copy['nat']['advancedoutbound']['rule'][$x]['descr'] = remove_special_characters($config_copy['nat']['advancedoutbound']['rule'][$x]['descr']);
}
+ if (is_array($config_copy['nat']['rule']))
for ($x = 0; $x < count($config_copy['nat']['rule']); $x++) {
if (isset ($config_copy['nat']['rule'][$x]['nosync']))
unset ($config_copy['nat']['rule'][$x]);
$config_copy['nat']['rule'][$x]['descr'] = remove_special_characters($config_copy['nat']['rule'][$x]['descr']);
}
+ if (is_array($config_copy['filter']['rule']))
for ($x = 0; $x < count($config_copy['filter']['rule']); $x++) {
if (isset ($config_copy['filter']['rule'][$x]['nosync']))
unset ($config_copy['filter']['rule'][$x]);
$config_copy['filter']['rule'][$x]['descr'] = remove_special_characters($config_copy['filter']['rule'][$x]['descr']);
}
+ if (is_array($config_copy['aliases']['alias']))
for ($x = 0; $x < count($config_copy['aliases']['alias']); $x++) {
if (isset ($config_copy['aliases']['alias'][$x]['nosync']))
unset ($config_copy['aliases']['alias'][$x]);
$config_copy['aliases']['alias'][$x]['descr'] = remove_special_characters($config_copy['aliases']['alias'][$x]['descr']);
}
+ if (is_array($config_copy['dnsmasq']['hosts']))
for ($x = 0; $x < count($config_copy['dnsmasq']['hosts']); $x++) {
if (isset ($config_copy['dnsmasq']['hosts'][$x]['nosync']))
unset ($config_copy['dnsmasq']['hosts'][$x]);
$config_copy['dnsmasq']['hosts'][$x]['descr'] = remove_special_characters($config_copy['dnsmasq']['hosts'][$x]['descr']);
}
+ if (is_array($config_copy['virtualip']['vip']))
for ($x = 0; $x < count($config_copy['virtualip']['vip']); $x++) {
if (isset ($config_copy['virtualip']['vip'][$x]['nosync']) or $config_copy['virtualip']['vip'][$x]['mode'] == "proxyarp")
unset ($config_copy['virtualip']['vip'][$x]);
$config_copy['virtualip']['vip'][$x]['descr'] = remove_special_characters($config_copy['virtualip']['vip'][$x]['descr']);
}
+ if (is_array($config_copy['ipsec']['tunnel']))
for ($x = 0; $x < count($config_copy['ipsec']['tunnel']); $x++) {
if (isset ($config_copy['ipsec']['tunnel'][$x]['nosync']))
unset ($config_copy['ipsec']['tunnel'][$x]);
OpenPOWER on IntegriCloud