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
18101b0f
Commit
18101b0f
authored
Jul 21, 2015
by
Ad Schellevis
Committed by
Franco Fichtner
Jul 29, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(legacy) move inline requires
parent
733cf7c8
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
11 additions
and
25 deletions
+11
-25
filter.inc
src/etc/inc/filter.inc
+1
-6
services.inc
src/etc/inc/services.inc
+4
-5
system.inc
src/etc/inc/system.inc
+1
-1
upgrade_config.inc
src/etc/inc/upgrade_config.inc
+2
-2
util.inc
src/etc/inc/util.inc
+1
-3
vpn.inc
src/etc/inc/vpn.inc
+0
-2
vslb.inc
src/etc/inc/vslb.inc
+2
-6
No files found.
src/etc/inc/filter.inc
View file @
18101b0f
...
...
@@ -29,6 +29,7 @@
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
require_once
(
"ipsec.inc"
);
/* holds the items that will be executed *AFTER* the filter is fully loaded */
$after_filter_configure_run
=
array
();
...
...
@@ -700,8 +701,6 @@ function filter_get_vpns_list() {
if
(
is_array
(
$config
[
'ipsec'
][
'phase2'
]))
{
foreach
(
$config
[
'ipsec'
][
'phase2'
]
as
$ph2ent
)
{
if
((
!
$ph2ent
[
'mobile'
])
&&
(
$ph2ent
[
'mode'
]
!=
'transport'
))
{
if
(
!
function_exists
(
'ipsec_idinfo_to_cidr'
))
require_once
(
"ipsec.inc"
);
if
(
!
is_array
(
$ph2ent
[
'remoteid'
]))
continue
;
$ph2ent
[
'remoteid'
][
'mode'
]
=
$ph2ent
[
'mode'
];
...
...
@@ -1642,8 +1641,6 @@ function filter_nat_rules_generate() {
if
(
is_array
(
$config
[
'ipsec'
][
'phase2'
]))
{
foreach
(
$config
[
'ipsec'
][
'phase2'
]
as
$ph2ent
)
{
if
(
$ph2ent
[
'mode'
]
!=
'transport'
&&
!
empty
(
$ph2ent
[
'natlocalid'
]))
{
if
(
!
function_exists
(
'ipsec_idinfo_to_cidr'
))
require_once
(
"ipsec.inc"
);
if
(
!
is_array
(
$ph2ent
[
'localid'
]))
$ph2ent
[
'localid'
]
=
array
();
$ph2ent
[
'localid'
][
'mode'
]
=
$ph2ent
[
'mode'
];
...
...
@@ -3433,8 +3430,6 @@ function filter_generate_ipsec_rules($log = array())
continue
;
/* determine local and remote peer addresses */
if
(
!
isset
(
$ph1ent
[
'mobile'
]))
{
if
(
!
function_exists
(
'ipsec_get_phase1_dst'
))
require_once
(
"ipsec.inc"
);
$rgip
=
ipsec_get_phase1_dst
(
$ph1ent
);
if
(
!
$rgip
)
{
$ipfrules
.=
"# ERROR! Unable to determine remote IPsec peer address for
{
$ph1ent
[
'remote-gateway'
]
}
\n
"
;
...
...
src/etc/inc/services.inc
View file @
18101b0f
...
...
@@ -27,6 +27,10 @@
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
/* load up the dyndns.class */
require_once
(
"dyndns.class"
);
require_once
(
'unbound.inc'
);
require_once
(
'miniupnpd.inc'
);
function
generate_ipv6_from_mac
(
$mac
)
{
$elements
=
explode
(
":"
,
$mac
);
...
...
@@ -1700,9 +1704,6 @@ function services_dyndns_configure_client($conf) {
if
(
!
isset
(
$conf
[
'enable'
]))
return
;
/* load up the dyndns.class */
require_once
(
"dyndns.class"
);
$dns
=
new
updatedns
(
$dnsService
=
$conf
[
'type'
],
$dnsHost
=
$conf
[
'host'
],
$dnsUser
=
$conf
[
'username'
],
...
...
@@ -1944,7 +1945,6 @@ function services_unbound_configure()
else
sleep
(
1
);
require_once
(
'unbound.inc'
);
sync_unbound_service
();
if
(
file_exists
(
"/var/run/booting"
))
echo
gettext
(
"done."
)
.
"
\n
"
;
...
...
@@ -2372,7 +2372,6 @@ function upnp_start()
if
(
!
empty
(
$config
[
'installedpackages'
][
'miniupnpd'
][
'config'
][
0
][
'enable'
]))
{
echo
gettext
(
"Starting UPnP service... "
);
require_once
(
'miniupnpd.inc'
);
sync_package_miniupnpd
();
echo
"done.
\n
"
;
}
...
...
src/etc/inc/system.inc
View file @
18101b0f
...
...
@@ -25,6 +25,7 @@
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
require_once
(
"unbound.inc"
);
function
activate_powerd
()
{
...
...
@@ -346,7 +347,6 @@ function system_hosts_generate()
fclose
(
$fd
);
if
(
isset
(
$config
[
'unbound'
][
'enable'
]))
{
require_once
(
"unbound.inc"
);
unbound_hosts_generate
();
}
...
...
src/etc/inc/upgrade_config.inc
View file @
18101b0f
...
...
@@ -28,6 +28,8 @@
*/
require_once
(
'rrd.inc'
);
require_once
(
"services.inc"
);
require_once
(
"certs.inc"
);
function
dump_rrd_to_xml
(
$rrddatabase
,
$xmldumpfile
)
{
...
...
@@ -2251,7 +2253,6 @@ function upgrade_058_to_059() {
function
upgrade_059_to_060
()
{
global
$config
;
require_once
(
"certs.inc"
);
if
(
is_array
(
$config
[
'ca'
]))
{
/* Locate issuer for all CAs */
foreach
(
$config
[
'ca'
]
as
&
$ca
)
{
...
...
@@ -3156,7 +3157,6 @@ function upgrade_098_to_099() {
}
function
upgrade_099_to_100
()
{
require_once
(
"services.inc"
);
install_cron_job
(
"newsyslog"
,
false
);
}
...
...
src/etc/inc/util.inc
View file @
18101b0f
...
...
@@ -25,6 +25,7 @@
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
require_once
(
"interfaces.inc"
);
function
killbyname
(
$procname
,
$sig
=
'TERM'
)
{
...
...
@@ -758,8 +759,6 @@ function get_configured_interface_with_descr($only_opt = false, $withdisabled =
function
get_configured_ip_addresses
()
{
global
$config
;
if
(
!
function_exists
(
'get_interface_ip'
))
require_once
(
"interfaces.inc"
);
$ip_array
=
array
();
$interfaces
=
get_configured_interface_list
();
if
(
is_array
(
$interfaces
))
{
...
...
@@ -797,7 +796,6 @@ function get_configured_ip_addresses() {
*/
function
get_configured_ipv6_addresses
()
{
require_once
(
"interfaces.inc"
);
$ipv6_array
=
array
();
$interfaces
=
get_configured_interface_list
();
if
(
is_array
(
$interfaces
))
{
...
...
src/etc/inc/vpn.inc
View file @
18101b0f
...
...
@@ -698,8 +698,6 @@ EOD;
if
(
!
empty
(
$ealg_kl
)
&&
$ealg_kl
==
"auto"
)
{
if
(
empty
(
$p2_ealgos
)
||
!
is_array
(
$p2_ealgos
))
require_once
(
"ipsec.inc"
);
$key_hi
=
$p2_ealgos
[
$ealg_id
][
'keysel'
][
'hi'
];
$key_lo
=
$p2_ealgos
[
$ealg_id
][
'keysel'
][
'lo'
];
$key_step
=
$p2_ealgos
[
$ealg_id
][
'keysel'
][
'step'
];
...
...
src/etc/inc/vslb.inc
View file @
18101b0f
...
...
@@ -25,6 +25,8 @@
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
require_once
(
"filter.inc"
);
function
subnetv4_expand
(
$subnet
)
{
$result
=
array
();
list
(
$ip
,
$bits
)
=
explode
(
"/"
,
$subnet
);
...
...
@@ -128,12 +130,6 @@ class SendMonitor extends Monitor {
function
relayd_configure
(
$kill_first
=
false
)
{
global
$config
,
$g
;
// have to do this until every call to filter.inc is
// require_once() instead of require().
if
(
!
function_exists
(
'filter_expand_alias_array'
))
{
require_once
(
"filter.inc"
);
}
if
(
isset
(
$config
[
'load_balancer'
][
'virtual_server'
]))
{
$vs_a
=
$config
[
'load_balancer'
][
'virtual_server'
];
}
else
{
...
...
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