Commit af7776e6 authored by Franco Fichtner's avatar Franco Fichtner

ipsec: fix a crash report

parent 65ea61e2
......@@ -821,8 +821,10 @@ EOD;
mwexec("/usr/local/sbin/ipsec start", false);
}
if ($natfilterrules == true)
if ($natfilterrules == true) {
filter_configure();
}
/* start filterdns, if necessary */
if (count($filterdns_list) > 0) {
$interval = 60;
......
......@@ -241,12 +241,13 @@ function merge_config_section_xmlrpc($confData)
function restore_config_section_xmlrpc($new_config)
{
global $config;
require_once("interfaces.inc");
require_once("filter.inc");
// TODO: initial cleanup operation performed, but a full rewrite is probably a better plan.
$old_config = $config;
// Some sections should just be copied and not merged or we end
// up unable to sync the deletion of the last item in a section
$sync_full = array('ipsec', 'aliases', 'wol', 'load_balancer', 'openvpn', 'cert', 'ca', 'crl', 'schedules', 'filter', 'nat', 'dhcpd', 'dhcpv6');
......
......@@ -29,19 +29,20 @@
require_once("interfaces.inc");
require_once("guiconfig.inc");
require_once("filter.inc");
require_once("vpn.inc");
require_once("services.inc");
require_once("pfsense-utils.inc");
if (!is_array($config['ipsec'])) {
if (!isset($config['ipsec'])) {
$config['ipsec'] = array();
}
if (!is_array($config['ipsec']['phase1'])) {
if (!isset($config['ipsec']['phase1'])) {
$config['ipsec']['phase1'] = array();
}
if (!is_array($config['ipsec']['client'])) {
if (!isset($config['ipsec']['client'])) {
$config['ipsec']['client'] = array();
}
......
......@@ -30,11 +30,11 @@
*/
require_once("guiconfig.inc");
require_once("vpn.inc");
require_once("filter.inc");
require_once("services.inc");
require_once("pfsense-utils.inc");
require_once("interfaces.inc");
/*
* ikeid management functions
*/
......@@ -59,15 +59,15 @@ function ipsec_ikeid_next() {
}
if (!is_array($config['ipsec'])) {
$config['ipsec'] = array();
if (!isset($config['ipsec'])) {
$config['ipsec'] = array();
}
if (!is_array($config['ipsec']['phase1'])) {
if (!isset($config['ipsec']['phase1'])) {
$config['ipsec']['phase1'] = array();
}
if (!is_array($config['ipsec']['phase2'])) {
if (!isset($config['ipsec']['phase2'])) {
$config['ipsec']['phase2'] = array();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment