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
26a8f686
Commit
26a8f686
authored
Feb 04, 2016
by
Franco Fichtner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dhcp: fix missed subsystem clean for static maps with dns resolver
Closes #726
parent
0f0a1959
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
20 deletions
+16
-20
services_dhcp.php
src/www/services_dhcp.php
+16
-20
No files found.
src/www/services_dhcp.php
View file @
26a8f686
...
@@ -480,9 +480,6 @@ if (isset($_POST['submit'])) {
...
@@ -480,9 +480,6 @@ if (isset($_POST['submit'])) {
}
}
if
(
isset
(
$_POST
[
'submit'
])
||
isset
(
$_POST
[
'apply'
]))
{
if
(
isset
(
$_POST
[
'submit'
])
||
isset
(
$_POST
[
'apply'
]))
{
$retval
=
0
;
$retvaldhcp
=
0
;
$retvaldns
=
0
;
/* Stop DHCP so we can cleanup leases */
/* Stop DHCP so we can cleanup leases */
killbyname
(
"dhcpd"
);
killbyname
(
"dhcpd"
);
dhcp_clean_leases
();
dhcp_clean_leases
();
...
@@ -490,25 +487,21 @@ if (isset($_POST['submit']) || isset($_POST['apply'])) {
...
@@ -490,25 +487,21 @@ if (isset($_POST['submit']) || isset($_POST['apply'])) {
/* dnsmasq_configure calls dhcpd_configure */
/* dnsmasq_configure calls dhcpd_configure */
/* no need to restart dhcpd twice */
/* no need to restart dhcpd twice */
if
(
isset
(
$config
[
'dnsmasq'
][
'enable'
])
&&
isset
(
$config
[
'dnsmasq'
][
'regdhcpstatic'
]))
{
if
(
isset
(
$config
[
'dnsmasq'
][
'enable'
])
&&
isset
(
$config
[
'dnsmasq'
][
'regdhcpstatic'
]))
{
$retvaldns
=
services_dnsmasq_configure
();
services_dnsmasq_configure
();
if
(
$retvaldns
==
0
)
{
clear_subsystem_dirty
(
'hosts'
);
clear_subsystem_dirty
(
'hosts'
);
}
elseif
(
isset
(
$config
[
'unbound'
][
'enable'
])
&&
isset
(
$config
[
'unbound'
][
'regdhcpstatic'
]))
{
clear_subsystem_dirty
(
'staticmaps'
);
services_unbound_configure
();
}
clear_subsystem_dirty
(
'unbound'
);
}
else
if
(
isset
(
$config
[
'unbound'
][
'enable'
])
&&
isset
(
$config
[
'unbound'
][
'regdhcpstatic'
]))
{
$retvaldns
=
services_unbound_configure
();
if
(
$retvaldns
==
0
)
clear_subsystem_dirty
(
'unbound'
);
}
else
{
}
else
{
$retvaldhcp
=
services_dhcpd_configure
();
services_dhcpd_configure
();
if
(
$retvaldhcp
==
0
)
}
clear_subsystem_dirty
(
'staticmaps'
);
clear_subsystem_dirty
(
'staticmaps'
);
if
(
$dhcpd_enable_changed
)
{
filter_configure
();
}
}
if
(
$dhcpd_enable_changed
)
$retvalfc
=
filter_configure
();
if
(
$retvaldhcp
==
1
||
$retvaldns
==
1
||
$retvalfc
==
1
)
$retval
=
1
;
$savemsg
=
get_std_save_message
();
$savemsg
=
get_std_save_message
();
}
}
...
@@ -527,8 +520,11 @@ if ($act == "del") {
...
@@ -527,8 +520,11 @@ if ($act == "del") {
write_config
();
write_config
();
if
(
isset
(
$config
[
'dhcpd'
][
$if
][
'enable'
]))
{
if
(
isset
(
$config
[
'dhcpd'
][
$if
][
'enable'
]))
{
mark_subsystem_dirty
(
'staticmaps'
);
mark_subsystem_dirty
(
'staticmaps'
);
if
(
isset
(
$config
[
'dnsmasq'
][
'enable'
])
&&
isset
(
$config
[
'dnsmasq'
][
'regdhcpstatic'
]))
if
(
isset
(
$config
[
'dnsmasq'
][
'enable'
])
&&
isset
(
$config
[
'dnsmasq'
][
'regdhcpstatic'
]))
{
mark_subsystem_dirty
(
'hosts'
);
mark_subsystem_dirty
(
'hosts'
);
}
elseif
(
isset
(
$config
[
'unbound'
][
'enable'
])
&&
isset
(
$config
[
'unbound'
][
'regdhcpstatic'
]))
{
mark_subsystem_dirty
(
'unbound'
);
}
}
}
header
(
"Location: services_dhcp.php?if=
{
$if
}
"
);
header
(
"Location: services_dhcp.php?if=
{
$if
}
"
);
exit
;
exit
;
...
...
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