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
1ff9cef7
Commit
1ff9cef7
authored
Mar 03, 2015
by
Franco Fichtner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
inc: fix usage due to PHP's is_array() warning level raise
parent
21abc362
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
27 deletions
+9
-27
authgui.inc
src/etc/inc/authgui.inc
+3
-10
filter.inc
src/etc/inc/filter.inc
+1
-1
interfaces.inc
src/etc/inc/interfaces.inc
+1
-1
vpn.inc
src/etc/inc/vpn.inc
+4
-15
No files found.
src/etc/inc/authgui.inc
View file @
1ff9cef7
<?php
/* $Id$ */
/*
Copyright (C) 2007, 2008 Scott Ullrich <sullrich@gmail.com>
All rights reserved.
Copyright (C) 2005-2006 Bill Marquette <bill.marquette@gmail.com>
All rights reserved.
Copyright (C) 2006 Paul Taylor <paultaylor@winn-dixie.com>.
All rights reserved.
Copyright (C) 2003-2006 Manuel Kasper <mk@neon1.net>.
All rights reserved.
...
...
@@ -33,9 +27,8 @@
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
pfSense_MODULE: authgui
*/
include_once
(
"auth.inc"
);
include_once
(
"priv.inc"
);
...
...
@@ -199,7 +192,7 @@ function display_login_form() {
}
}
}
if
(
is
_array
(
$config
[
'openvpn'
][
'openvpn-server'
]))
{
if
(
is
set
(
$config
[
'openvpn'
][
'openvpn-server'
]))
{
foreach
(
$config
[
'openvpn'
][
'openvpn-server'
]
as
$ovpns
)
{
if
(
is_ipaddrv4
(
$http_host
)
&&
!
empty
(
$ovpns
[
'tunnel_network'
])
&&
ip_in_subnet
(
$http_host
,
$ovpns
[
'tunnel_network'
]))
{
$local_ip
=
true
;
...
...
src/etc/inc/filter.inc
View file @
1ff9cef7
...
...
@@ -960,7 +960,7 @@ function filter_generate_optcfg_array()
$FilterIflist
[
'enc0'
]
=
$oic
;
}
/* add openvpn interfaces */
if
(
$config
[
'openvpn'
][
'openvpn-server'
]
||
$config
[
'openvpn'
][
'openvpn-client'
]
)
{
if
(
isset
(
$config
[
'openvpn'
][
'openvpn-server'
])
||
isset
(
$config
[
'openvpn'
][
'openvpn-client'
])
)
{
$oic
=
array
();
$oic
[
'if'
]
=
"openvpn"
;
$oic
[
'descr'
]
=
'OpenVPN'
;
...
...
src/etc/inc/interfaces.inc
View file @
1ff9cef7
...
...
@@ -5270,7 +5270,7 @@ function interfaces_staticarp_configure($if)
}
else
{
mwexec
(
"/sbin/ifconfig "
.
escapeshellarg
(
$ifcfg
[
'if'
])
.
" -staticarp "
);
mwexec
(
"/usr/sbin/arp -d -i "
.
escapeshellarg
(
$ifcfg
[
'if'
])
.
" -a > /dev/null 2>&1 "
);
if
(
is
_array
(
$config
[
'dhcpd'
][
$if
])
&&
is_array
(
$config
[
'dhcpd'
][
$if
][
'staticmap'
]))
{
if
(
is
set
(
$config
[
'dhcpd'
][
$if
][
'staticmap'
]))
{
foreach
(
$config
[
'dhcpd'
][
$if
][
'staticmap'
]
as
$arpent
)
{
if
(
isset
(
$arpent
[
'arp_table_static_entry'
]))
{
mwexec
(
"/usr/sbin/arp -s "
.
escapeshellarg
(
$arpent
[
'ipaddr'
])
.
" "
.
escapeshellarg
(
$arpent
[
'mac'
]));
...
...
src/etc/inc/vpn.inc
View file @
1ff9cef7
<?php
/*
vpn.inc
Copyright (C) 2004 Scott Ullrich
Copyright (C) 2008 Shrew Soft Inc
Copyright (C) 2008 Ermal Lu�i
All rights reserved.
originally part of m0n0wall (http://m0n0.ch/wall)
Copyright (C) 2008 Ermal Luçi
Copyright (C) 2003-2004 Manuel Kasper <mk@neon1.net>.
All rights reserved.
...
...
@@ -33,13 +29,6 @@
POSSIBILITY OF SUCH DAMAGE.
*/
/*
pfSense_BUILDER_BINARIES: /sbin/ifconfig
pfSense_BUILDER_BINARIES: /usr/local/sbin/ipsec /usr/local/libexec/ipsec/charon /usr/local/libexec/ipsec/starter
pfSense_BUILDER_BINARIES: /usr/local/sbin/filterdns /usr/local/sbin/mpd4
pfSense_MODULE: vpn
*/
require_once
(
"ipsec.inc"
);
function
vpn_ipsec_configure_loglevels
(
$forconfig
=
false
)
...
...
@@ -106,9 +95,9 @@ function vpn_ipsec_configure($ipchg = false)
$syscfg
=
$config
[
'system'
];
$ipseccfg
=
$config
[
'ipsec'
];
$a_phase1
=
$config
[
'ipsec'
][
'phase1'
]
;
$a_phase2
=
$config
[
'ipsec'
][
'phase2'
]
;
$a_client
=
$config
[
'ipsec'
][
'client'
]
;
$a_phase1
=
isset
(
$config
[
'ipsec'
][
'phase1'
])
?
$config
[
'ipsec'
][
'phase1'
]
:
array
()
;
$a_phase2
=
isset
(
$config
[
'ipsec'
][
'phase2'
])
?
$config
[
'ipsec'
][
'phase2'
]
:
array
()
;
$a_client
=
isset
(
$config
[
'ipsec'
][
'client'
])
?
$config
[
'ipsec'
][
'client'
]
:
array
()
;
if
(
!
isset
(
$ipseccfg
[
'enable'
]))
{
/* try to stop charon */
...
...
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