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
051eab3d
Commit
051eab3d
authored
Jul 22, 2015
by
Ad Schellevis
Committed by
Franco Fichtner
Jul 29, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(legacy) move is_radvd_enabled to services.inc (single use)
parent
a49c15d4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
52 additions
and
51 deletions
+52
-51
pfsense-utils.inc
src/etc/inc/pfsense-utils.inc
+0
-51
services.inc
src/etc/inc/services.inc
+52
-0
No files found.
src/etc/inc/pfsense-utils.inc
View file @
051eab3d
...
@@ -418,57 +418,6 @@ function reload_ttys()
...
@@ -418,57 +418,6 @@ function reload_ttys()
exec
(
'/bin/kill -HUP 1'
);
exec
(
'/bin/kill -HUP 1'
);
}
}
/* radvd enabled on any interfaces? */
function
is_radvd_enabled
()
{
global
$config
;
if
(
!
isset
(
$config
[
'dhcpdv6'
])
||
!
is_array
(
$config
[
'dhcpdv6'
]))
{
$config
[
'dhcpdv6'
]
=
array
();
}
$dhcpdv6cfg
=
$config
[
'dhcpdv6'
];
$Iflist
=
get_configured_interface_list
();
/* handle manually configured DHCP6 server settings first */
foreach
(
$dhcpdv6cfg
as
$dhcpv6if
=>
$dhcpv6ifconf
)
{
if
(
!
isset
(
$config
[
'interfaces'
][
$dhcpv6if
][
'enable'
]))
continue
;
if
(
!
isset
(
$dhcpv6ifconf
[
'ramode'
]))
$dhcpv6ifconf
[
'ramode'
]
=
$dhcpv6ifconf
[
'mode'
];
if
(
$dhcpv6ifconf
[
'ramode'
]
==
"disabled"
)
continue
;
$ifcfgipv6
=
get_interface_ipv6
(
$dhcpv6if
);
if
(
!
is_ipaddrv6
(
$ifcfgipv6
))
continue
;
return
true
;
}
/* handle DHCP-PD prefixes and 6RD dynamic interfaces */
foreach
(
$Iflist
as
$if
=>
$ifdescr
)
{
if
(
!
isset
(
$config
[
'interfaces'
][
$if
][
'track6-interface'
]))
continue
;
if
(
!
isset
(
$config
[
'interfaces'
][
$if
][
'enable'
]))
continue
;
$ifcfgipv6
=
get_interface_ipv6
(
$if
);
if
(
!
is_ipaddrv6
(
$ifcfgipv6
))
continue
;
$ifcfgsnv6
=
get_interface_subnetv6
(
$if
);
$subnetv6
=
gen_subnetv6
(
$ifcfgipv6
,
$ifcfgsnv6
);
if
(
!
is_ipaddrv6
(
$subnetv6
))
continue
;
return
true
;
}
return
false
;
}
/* Any PPPoE servers enabled? */
/* Any PPPoE servers enabled? */
function
is_pppoe_server_enabled
()
{
function
is_pppoe_server_enabled
()
{
...
...
src/etc/inc/services.inc
View file @
051eab3d
...
@@ -2696,3 +2696,55 @@ function get_service_control_links($service, $addname = false) {
...
@@ -2696,3 +2696,55 @@ function get_service_control_links($service, $addname = false) {
}
}
return
$output
;
return
$output
;
}
}
/* radvd enabled on any interfaces? */
function
is_radvd_enabled
()
{
global
$config
;
if
(
!
isset
(
$config
[
'dhcpdv6'
])
||
!
is_array
(
$config
[
'dhcpdv6'
]))
{
$config
[
'dhcpdv6'
]
=
array
();
}
$dhcpdv6cfg
=
$config
[
'dhcpdv6'
];
$Iflist
=
get_configured_interface_list
();
/* handle manually configured DHCP6 server settings first */
foreach
(
$dhcpdv6cfg
as
$dhcpv6if
=>
$dhcpv6ifconf
)
{
if
(
!
isset
(
$config
[
'interfaces'
][
$dhcpv6if
][
'enable'
]))
continue
;
if
(
!
isset
(
$dhcpv6ifconf
[
'ramode'
]))
$dhcpv6ifconf
[
'ramode'
]
=
$dhcpv6ifconf
[
'mode'
];
if
(
$dhcpv6ifconf
[
'ramode'
]
==
"disabled"
)
continue
;
$ifcfgipv6
=
get_interface_ipv6
(
$dhcpv6if
);
if
(
!
is_ipaddrv6
(
$ifcfgipv6
))
continue
;
return
true
;
}
/* handle DHCP-PD prefixes and 6RD dynamic interfaces */
foreach
(
$Iflist
as
$if
=>
$ifdescr
)
{
if
(
!
isset
(
$config
[
'interfaces'
][
$if
][
'track6-interface'
]))
continue
;
if
(
!
isset
(
$config
[
'interfaces'
][
$if
][
'enable'
]))
continue
;
$ifcfgipv6
=
get_interface_ipv6
(
$if
);
if
(
!
is_ipaddrv6
(
$ifcfgipv6
))
continue
;
$ifcfgsnv6
=
get_interface_subnetv6
(
$if
);
$subnetv6
=
gen_subnetv6
(
$ifcfgipv6
,
$ifcfgsnv6
);
if
(
!
is_ipaddrv6
(
$subnetv6
))
continue
;
return
true
;
}
return
false
;
}
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