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
72f6a04b
Commit
72f6a04b
authored
Feb 19, 2016
by
Ad Schellevis
Committed by
Franco Fichtner
Mar 03, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(legacy) minor cleanups in services.inc
(cherry picked from commit
7e51a404
)
parent
c0b632a8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
12 deletions
+10
-12
services.inc
src/etc/inc/services.inc
+10
-12
No files found.
src/etc/inc/services.inc
View file @
72f6a04b
...
...
@@ -1172,7 +1172,12 @@ function services_dhcpdv6_configure($blacklist = array())
foreach
(
$dhcpdv6cfg
as
$dhcpv6if
=>
$dhcpv6ifconf
)
{
if
(
isset
(
$dhcpv6ifconf
[
'numberoptions'
][
'item'
]))
{
foreach
(
$dhcpv6ifconf
[
'numberoptions'
][
'item'
]
as
$itemv6idx
=>
$itemv6
)
{
$custoptionsv6
.=
"option custom-
{
$dhcpv6if
}
-
{
$itemv6idx
}
code
{
$itemv6
[
'number'
]
}
= text;
\n
"
;
if
(
!
empty
(
$itemv6
[
'type'
]))
{
$itemtype
=
$itemv6
[
'type'
];
}
else
{
$itemtype
=
"text"
;
}
$custoptionsv6
.=
"option custom-
{
$dhcpv6if
}
-
{
$itemv6idx
}
code
{
$itemv6
[
'number'
]
}
=
{
$itemtype
}
;
\n
"
;
}
}
}
...
...
@@ -1221,9 +1226,7 @@ EOD;
$ifcfgsnv6
=
get_interface_subnetv6
(
$dhcpv6if
);
$subnetv6
=
gen_subnetv6
(
$ifcfgipv6
,
$ifcfgsnv6
);
$dnscfgv6
=
""
;
if
(
!
empty
(
$dhcpv6ifconf
[
'domain'
]))
{
$dnscfgv6
.=
" option domain-name
\"
{
$dhcpv6ifconf
[
'domain'
]
}
\"
;
\n
"
;
}
...
...
@@ -1305,11 +1308,6 @@ EOD;
$dhcpdv6conf
.=
" option dhcp6.sntp-servers "
.
join
(
","
,
$dhcpv6ifconf
[
'ntpserver'
])
.
";
\n
"
;
}
}
// tftp-server-name
/* Needs ISC DHCPD support
if ($dhcpv6ifconf['tftp'] <> "")
$dhcpdv6conf .= " option tftp-server-name \"{$dhcpv6ifconf['tftp']}\";\n";
*/
// Handle option, number rowhelper values
$dhcpdv6conf
.=
"
\n
"
;
...
...
@@ -1343,20 +1341,20 @@ host s_{$dhcpv6if}_{$i} {
host-identifier option dhcp6.client-id {$sm['duid']};
EOD;
if
(
$sm
[
'ipaddrv6'
]
)
{
if
(
!
empty
(
$sm
[
'ipaddrv6'
])
)
{
$dhcpdv6conf
.=
" fixed-address6
{
$sm
[
'ipaddrv6'
]
}
;
\n
"
;
}
if
(
$sm
[
'hostname'
]
)
{
if
(
!
empty
(
$sm
[
'hostname'
])
)
{
$dhhostname
=
str_replace
(
" "
,
"_"
,
$sm
[
'hostname'
]);
$dhhostname
=
str_replace
(
"."
,
"_"
,
$dhhostname
);
$dhcpdv6conf
.=
" option host-name
{
$dhhostname
}
;
\n
"
;
}
if
(
$sm
[
'filename'
]
)
{
if
(
!
empty
(
$sm
[
'filename'
])
)
{
$dhcpdv6conf
.=
" filename
\"
{
$sm
[
'filename'
]
}
\"
;
\n
"
;
}
if
(
$sm
[
'rootpath'
]
)
{
if
(
!
empty
(
$sm
[
'rootpath'
])
)
{
$dhcpdv6conf
.=
" option root-path
\"
{
$sm
[
'rootpath'
]
}
\"
;
\n
"
;
}
...
...
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