Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
OpnSense
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kulya
OpnSense
Commits
2751f6f9
Commit
2751f6f9
authored
Jan 26, 2016
by
Ad Schellevis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(legacy) xmlrpc reduce number of custom hooks
parent
ab17de8c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
legacy.inc
src/etc/inc/xmlrpc/legacy.inc
+5
-4
No files found.
src/etc/inc/xmlrpc/legacy.inc
View file @
2751f6f9
...
...
@@ -159,8 +159,10 @@ function restore_config_section_xmlrpc($new_config)
// save old config
$old_config
=
$config
;
// Some sections should just be copied and not merged
$sync_full
=
array
(
'ipsec'
,
'aliases'
,
'wol'
,
'load_balancer'
,
'openvpn'
,
'cert'
,
'ca'
,
'crl'
,
'schedules'
,
'filter'
,
'nat'
,
'dhcpd'
,
'dhcpv6'
);
// Some sections should just be copied and not merged, namely if there's a risk of attributes being removed
// without being seen by the remote remote (backup) side.
// (ipsec, openvpn, nat can probably moved out later by specifying a better path to the attribute)
$sync_full
=
array
(
'ipsec'
,
'wol'
,
'dnsmasq'
,
'load_balancer'
,
'openvpn'
,
'nat'
,
'dhcpd'
,
'dhcpv6'
);
$sync_full_done
=
array
();
foreach
(
$sync_full
as
$syncfull
)
{
if
(
isset
(
$new_config
[
$syncfull
]))
{
...
...
@@ -172,12 +174,11 @@ function restore_config_section_xmlrpc($new_config)
$vipbackup
=
array
();
$oldvips
=
array
();
if
(
isset
(
$new_config
[
'virtualip'
][
'vip'
]))
{
if
(
isset
(
$new_config
[
'virtualip'
][
'vip'
])
&&
isset
(
$config
[
'virtualip'
][
'vip'
])
)
{
foreach
(
$config
[
'virtualip'
][
'vip'
]
as
$vipindex
=>
$vip
)
{
if
(
$vip
[
'mode'
]
==
"carp"
)
{
// rc.filter_synchronize only sends carp vips, keep the rest like it was
$oldvips
[
"
{
$vip
[
'interface'
]
}
_vip
{
$vip
[
'vhid'
]
}
"
]
=
$vip
;
$oldvips
[
"
{
$vip
[
'interface'
]
}
_vip
{
$vip
[
'vhid'
]
}
"
][
'cmp'
]
=
"
{
$vip
[
'password'
]
}{
$vip
[
'advskew'
]
}{
$vip
[
'subnet'
]
}{
$vip
[
'subnet_bits'
]
}{
$vip
[
'advbase'
]
}
"
;
}
else
{
$vipbackup
[]
=
$vip
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment