diff options
Diffstat (limited to 'etc')
-rwxr-xr-x | etc/rc.filter_synchronize | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/etc/rc.filter_synchronize b/etc/rc.filter_synchronize index 6e49ed3..36cb100 100755 --- a/etc/rc.filter_synchronize +++ b/etc/rc.filter_synchronize @@ -41,6 +41,7 @@ require_once("functions.inc"); require_once("filter.inc"); require_once("shaper.inc"); require_once("xmlrpc.inc"); +require_once("interfaces.inc"); /* * backup_vip_config_section($section): returns as an xml file string of @@ -146,6 +147,16 @@ function carp_sync_xml($url, $password, $sections, $port = 80, $method = 'pfsens } } + if (is_array($config_copy['dhcpd'])) { + foreach($config_copy['dhcpd'] as $dhcpif => $dhcpifconf) { + if($dhcpifconf['failover_peerip'] <> "") { + $int = guess_interface_from_ip($dhcpifconf['failover_peerip']); + $intip = find_interface_ip($int); + $config_copy['dhcpd'][$dhcpif]['failover_peerip'] = $intip; + } + } + } + foreach ($sections as $section) { /* we can't use array_intersect_key() * due to the vip 'special case' @@ -244,6 +255,10 @@ if (is_array($config['installedpackages']['carpsettings']['config'])) { $sections[] = 'load_balancer'; if ($carp['synchronizeipsec'] != "" and is_array($config['ipsec'])) $sections[] = 'ipsec'; + if ($carp['synchronizeopenvpn'] != "" and is_array($config['openvpn'])) + $sections[] = 'openvpn'; + if ($carp['synchronizedhcpd'] != "" and is_array($config['dhcpd'])) + $sections[] = 'dhcpd'; if ($carp['synchronizednsforwarder'] != "" and is_array($config['dnsmasq'])) $sections[] = 'dnsmasq'; if ($carp['synchronizeschedules'] != "" and is_array($config['schedules'])) |