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
d5bff281
Commit
d5bff281
authored
Jun 18, 2016
by
Franco Fichtner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
system: kernel modules belong to system
parent
6e438457
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
75 additions
and
77 deletions
+75
-77
pfsense-utils.inc
src/etc/inc/pfsense-utils.inc
+0
-77
system.inc
src/etc/inc/system.inc
+75
-0
No files found.
src/etc/inc/pfsense-utils.inc
View file @
d5bff281
...
...
@@ -319,81 +319,6 @@ function is_fqdn($fqdn) {
return
(
$hostname
);
}
function
load_kernel_module
()
{
$mods
=
array
(
'carp'
,
/*
* The netgraph(4) framework is loaded here
* for backwards compat with the pre-16.7
* kernel configuration that compiled all of
* these modules into the kernel. This list
* needs further pruning and probing, it's
* possible we do not need frame relay anymore.
*/
'netgraph'
,
'ng_UI'
,
'ng_async'
,
'ng_bpf'
,
'ng_bridge'
,
'ng_car'
,
'ng_cisco'
,
'ng_deflate'
,
'ng_echo'
,
'ng_eiface'
,
'ng_ether'
,
'ng_frame_relay'
,
'ng_hole'
,
'ng_iface'
,
'ng_ksocket'
,
'ng_l2tp'
,
'ng_lmi'
,
'ng_mppc'
,
'ng_one2many'
,
'ng_pipe'
,
'ng_ppp'
,
'ng_pppoe'
,
'ng_pptpgre'
,
'ng_pred1'
,
'ng_rfc1490'
,
'ng_socket'
,
'ng_tcpmss'
,
'ng_tee'
,
'ng_tty'
,
'ng_vjc'
,
'ng_vlan'
,
);
foreach
(
$mods
as
$mod
)
{
mwexecf
(
'/sbin/kldload %s'
,
$mod
);
}
}
function
load_crypto_module
()
{
global
$config
;
if
(
!
empty
(
$config
[
'system'
][
'crypto_hardware'
]))
{
log_error
(
sprintf
(
'Loading %s cryptographic accelerator module.'
,
$config
[
'system'
][
'crypto_hardware'
]));
mwexecf
(
'/sbin/kldload %s'
,
$config
[
'system'
][
'crypto_hardware'
],
true
);
}
if
(
isset
(
$config
[
'system'
][
'cryptodev_enable'
]))
{
log_error
(
'Loading cryptodev kernel module.'
);
mwexecf
(
'/sbin/kldload %s'
,
'cryptodev'
,
true
);
}
}
function
load_thermal_module
()
{
global
$config
;
if
(
!
empty
(
$config
[
'system'
][
'thermal_hardware'
]))
{
log_error
(
sprintf
(
'Loading %s thermal monitor module.'
,
$config
[
'system'
][
'thermal_hardware'
]));
mwexecf
(
'/sbin/kldload %s'
,
$config
[
'system'
][
'thermal_hardware'
],
true
);
}
}
function
download_file
(
$url
,
$destination
,
$verify_ssl
=
false
,
$connect_timeout
=
60
,
$timeout
=
0
)
{
global
$config
,
$g
;
...
...
@@ -782,8 +707,6 @@ function is_ipaddr_configured($ipaddr, $ignore_if = "", $check_localip = false,
return false;
}
/* Returns the calculated bit length of the prefix delegation from the WAN interface */
/* DHCP-PD is variable, calculate from the prefix-len on the WAN interface */
/* 6rd is variable, calculate from 64 - (v6 prefixlen - (32 - v4 prefixlen)) */
...
...
src/etc/inc/system.inc
View file @
d5bff281
...
...
@@ -1860,3 +1860,78 @@ function get_possible_traffic_source_addresses($include_ipv6_link_local=false) {
}
return
$sourceips
;
}
function
load_kernel_module
()
{
$mods
=
array
(
'carp'
,
/*
* The netgraph(4) framework is loaded here
* for backwards compat with the pre-16.7
* kernel configuration that compiled all of
* these modules into the kernel. This list
* needs further pruning and probing, it's
* possible we do not need frame relay anymore.
*/
'netgraph'
,
'ng_UI'
,
'ng_async'
,
'ng_bpf'
,
'ng_bridge'
,
'ng_car'
,
'ng_cisco'
,
'ng_deflate'
,
'ng_echo'
,
'ng_eiface'
,
'ng_ether'
,
'ng_frame_relay'
,
'ng_hole'
,
'ng_iface'
,
'ng_ksocket'
,
'ng_l2tp'
,
'ng_lmi'
,
'ng_mppc'
,
'ng_one2many'
,
'ng_pipe'
,
'ng_ppp'
,
'ng_pppoe'
,
'ng_pptpgre'
,
'ng_pred1'
,
'ng_rfc1490'
,
'ng_socket'
,
'ng_tcpmss'
,
'ng_tee'
,
'ng_tty'
,
'ng_vjc'
,
'ng_vlan'
,
);
foreach
(
$mods
as
$mod
)
{
mwexecf
(
'/sbin/kldload %s'
,
$mod
);
}
}
function
load_crypto_module
()
{
global
$config
;
if
(
!
empty
(
$config
[
'system'
][
'crypto_hardware'
]))
{
log_error
(
sprintf
(
'Loading %s cryptographic accelerator module.'
,
$config
[
'system'
][
'crypto_hardware'
]));
mwexecf
(
'/sbin/kldload %s'
,
$config
[
'system'
][
'crypto_hardware'
],
true
);
}
if
(
isset
(
$config
[
'system'
][
'cryptodev_enable'
]))
{
log_error
(
'Loading cryptodev kernel module.'
);
mwexecf
(
'/sbin/kldload %s'
,
'cryptodev'
,
true
);
}
}
function
load_thermal_module
()
{
global
$config
;
if
(
!
empty
(
$config
[
'system'
][
'thermal_hardware'
]))
{
log_error
(
sprintf
(
'Loading %s thermal monitor module.'
,
$config
[
'system'
][
'thermal_hardware'
]));
mwexecf
(
'/sbin/kldload %s'
,
$config
[
'system'
][
'thermal_hardware'
],
true
);
}
}
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