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
e9edf729
Commit
e9edf729
authored
Nov 20, 2016
by
Franco Fichtner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dhcp: static v6 entries with domain support
parent
be63780c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
4 deletions
+12
-4
services_dhcpv6_edit.php
src/www/services_dhcpv6_edit.php
+12
-4
No files found.
src/www/services_dhcpv6_edit.php
View file @
e9edf729
...
...
@@ -27,6 +27,7 @@
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
require_once
(
"guiconfig.inc"
);
require_once
(
"interfaces.inc"
);
require_once
(
"services.inc"
);
...
...
@@ -36,7 +37,6 @@ function staticmapcmp($a, $b)
return
ipcmp
(
$a
[
'ipaddrv6'
],
$b
[
'ipaddrv6'
]);
}
if
(
$_SERVER
[
'REQUEST_METHOD'
]
===
'GET'
)
{
// handle identifiers and action
if
(
!
empty
(
$_GET
[
'if'
])
&&
!
empty
(
$config
[
'interfaces'
][
$_GET
[
'if'
]]))
{
...
...
@@ -51,7 +51,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
// read form data
$pconfig
=
array
();
$config_copy_fieldnames
=
array
(
'duid'
,
'hostname'
,
'ipaddrv6'
,
'filename'
,
'rootpath'
,
'descr'
);
$config_copy_fieldnames
=
array
(
'duid'
,
'hostname'
,
'ipaddrv6'
,
'filename'
,
'rootpath'
,
'descr'
,
'domain'
);
foreach
(
$config_copy_fieldnames
as
$fieldname
)
{
if
(
isset
(
$if
)
&&
isset
(
$id
)
&&
isset
(
$config
[
'dhcpdv6'
][
$if
][
'staticmap'
][
$id
][
$fieldname
]))
{
$pconfig
[
$fieldname
]
=
$config
[
'dhcpdv6'
][
$if
][
'staticmap'
][
$id
][
$fieldname
];
...
...
@@ -61,7 +61,6 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
$pconfig
[
$fieldname
]
=
null
;
}
}
}
elseif
(
$_SERVER
[
'REQUEST_METHOD'
]
===
'POST'
)
{
$input_errors
=
array
();
$pconfig
=
$_POST
;
...
...
@@ -118,7 +117,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
}
if
(
count
(
$input_errors
)
==
0
)
{
$mapent
=
array
();
$config_copy_fieldnames
=
array
(
'duid'
,
'ipaddrv6'
,
'hostname'
,
'descr'
,
'filename'
,
'rootpath'
);
$config_copy_fieldnames
=
array
(
'duid'
,
'ipaddrv6'
,
'hostname'
,
'descr'
,
'filename'
,
'rootpath'
,
'domain'
);
foreach
(
$config_copy_fieldnames
as
$fieldname
)
{
if
(
!
empty
(
$pconfig
[
$fieldname
]))
{
$mapent
[
$fieldname
]
=
$pconfig
[
$fieldname
];
...
...
@@ -207,6 +206,15 @@ include("head.inc");
</div>
</td>
</tr>
<tr>
<td><a
id=
"help_for_domain"
href=
"#"
class=
"showhelp"
><i
class=
"fa fa-info-circle"
></i></a>
<?=
gettext
(
"Domain name"
);
?>
</td>
<td>
<input
name=
"domain"
type=
"text"
value=
"
<?=
$pconfig
[
'domain'
];
?>
"
/>
<div
class=
"hidden"
for=
"help_for_domain"
>
<?=
gettext
(
"The default is to use the domain name of this system as the default domain name provided by DHCP. You may specify an alternate domain name here."
);
?>
</div>
</td>
</tr>
<?php
if
(
isset
(
$config
[
'dhcpdv6'
][
$if
][
'netboot'
]))
:
?>
<tr>
<td><a
id=
"help_for_filename"
href=
"#"
class=
"showhelp"
><i
class=
"fa fa-info-circle"
></i></a>
<?=
gettext
(
'Netboot filename'
)
?>
</td>
...
...
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