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
a741a9e2
Commit
a741a9e2
authored
Jan 04, 2016
by
Ad Schellevis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(legacy) add some missing curly braces
parent
791ccd11
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
32 additions
and
17 deletions
+32
-17
firewall_nat_1to1_edit.php
src/www/firewall_nat_1to1_edit.php
+11
-6
firewall_nat_npt_edit.php
src/www/firewall_nat_npt_edit.php
+10
-5
firewall_nat_out_edit.php
src/www/firewall_nat_out_edit.php
+11
-6
No files found.
src/www/firewall_nat_1to1_edit.php
View file @
a741a9e2
...
@@ -53,25 +53,30 @@ function formNetworks() {
...
@@ -53,25 +53,30 @@ function formNetworks() {
function
formInterfaces
()
{
function
formInterfaces
()
{
global
$config
;
global
$config
;
$interfaces
=
array
();
$interfaces
=
array
();
foreach
(
get_configured_interface_with_descr
(
false
,
true
)
as
$if
=>
$ifdesc
)
foreach
(
get_configured_interface_with_descr
(
false
,
true
)
as
$if
=>
$ifdesc
)
{
$interfaces
[
$if
]
=
$ifdesc
;
$interfaces
[
$if
]
=
$ifdesc
;
}
if
(
isset
(
$config
[
'l2tp'
][
'mode'
])
&&
$config
[
'l2tp'
][
'mode'
]
==
"server"
)
if
(
isset
(
$config
[
'l2tp'
][
'mode'
])
&&
$config
[
'l2tp'
][
'mode'
]
==
"server"
)
{
$interfaces
[
'l2tp'
]
=
"L2TP VPN"
;
$interfaces
[
'l2tp'
]
=
"L2TP VPN"
;
}
if
(
isset
(
$config
[
'pptpd'
][
'mode'
])
&&
$config
[
'pptpd'
][
'mode'
]
==
"server"
)
if
(
isset
(
$config
[
'pptpd'
][
'mode'
])
&&
$config
[
'pptpd'
][
'mode'
]
==
"server"
)
{
$interfaces
[
'pptp'
]
=
"PPTP VPN"
;
$interfaces
[
'pptp'
]
=
"PPTP VPN"
;
}
if
(
is_pppoe_server_enabled
())
if
(
is_pppoe_server_enabled
())
{
$interfaces
[
'pppoe'
]
=
"PPPoE VPN"
;
$interfaces
[
'pppoe'
]
=
"PPPoE VPN"
;
}
/* add ipsec interfaces */
/* add ipsec interfaces */
if
(
isset
(
$config
[
'ipsec'
][
'enable'
])
||
isset
(
$config
[
'ipsec'
][
'client'
][
'enable'
]))
if
(
isset
(
$config
[
'ipsec'
][
'enable'
])
||
isset
(
$config
[
'ipsec'
][
'client'
][
'enable'
]))
{
$interfaces
[
"enc0"
]
=
"IPsec"
;
$interfaces
[
"enc0"
]
=
"IPsec"
;
}
/* add openvpn/tun interfaces */
/* add openvpn/tun interfaces */
if
(
isset
(
$config
[
'openvpn'
][
'openvpn-server'
])
||
isset
(
$config
[
'openvpn'
][
'openvpn-client'
]))
{
if
(
isset
(
$config
[
'openvpn'
][
'openvpn-server'
])
||
isset
(
$config
[
'openvpn'
][
'openvpn-client'
]))
{
$interfaces
[
'openvpn'
]
=
'OpenVPN'
;
$interfaces
[
'openvpn'
]
=
'OpenVPN'
;
}
}
return
$interfaces
;
return
$interfaces
;
}
}
...
...
src/www/firewall_nat_npt_edit.php
View file @
a741a9e2
...
@@ -37,21 +37,26 @@ require_once("pfsense-utils.inc");
...
@@ -37,21 +37,26 @@ require_once("pfsense-utils.inc");
function
formInterfaces
()
{
function
formInterfaces
()
{
global
$config
;
global
$config
;
$interfaces
=
array
();
$interfaces
=
array
();
foreach
(
get_configured_interface_with_descr
(
false
,
true
)
as
$if
=>
$ifdesc
)
foreach
(
get_configured_interface_with_descr
(
false
,
true
)
as
$if
=>
$ifdesc
)
{
$interfaces
[
$if
]
=
$ifdesc
;
$interfaces
[
$if
]
=
$ifdesc
;
}
if
(
isset
(
$config
[
'l2tp'
][
'mode'
])
&&
$config
[
'l2tp'
][
'mode'
]
==
"server"
)
if
(
isset
(
$config
[
'l2tp'
][
'mode'
])
&&
$config
[
'l2tp'
][
'mode'
]
==
"server"
)
{
$interfaces
[
'l2tp'
]
=
"L2TP VPN"
;
$interfaces
[
'l2tp'
]
=
"L2TP VPN"
;
}
if
(
isset
(
$config
[
'pptpd'
][
'mode'
])
&&
$config
[
'pptpd'
][
'mode'
]
==
"server"
)
if
(
isset
(
$config
[
'pptpd'
][
'mode'
])
&&
$config
[
'pptpd'
][
'mode'
]
==
"server"
)
{
$interfaces
[
'pptp'
]
=
"PPTP VPN"
;
$interfaces
[
'pptp'
]
=
"PPTP VPN"
;
}
if
(
is_pppoe_server_enabled
())
if
(
is_pppoe_server_enabled
())
{
$interfaces
[
'pppoe'
]
=
"PPPoE VPN"
;
$interfaces
[
'pppoe'
]
=
"PPPoE VPN"
;
}
/* add ipsec interfaces */
/* add ipsec interfaces */
if
(
isset
(
$config
[
'ipsec'
][
'enable'
])
||
isset
(
$config
[
'ipsec'
][
'client'
][
'enable'
]))
if
(
isset
(
$config
[
'ipsec'
][
'enable'
])
||
isset
(
$config
[
'ipsec'
][
'client'
][
'enable'
]))
{
$interfaces
[
"enc0"
]
=
"IPsec"
;
$interfaces
[
"enc0"
]
=
"IPsec"
;
}
/* add openvpn/tun interfaces */
/* add openvpn/tun interfaces */
if
(
isset
(
$config
[
'openvpn'
][
'openvpn-server'
])
||
isset
(
$config
[
'openvpn'
][
'openvpn-client'
]))
{
if
(
isset
(
$config
[
'openvpn'
][
'openvpn-server'
])
||
isset
(
$config
[
'openvpn'
][
'openvpn-client'
]))
{
...
...
src/www/firewall_nat_out_edit.php
View file @
a741a9e2
...
@@ -38,21 +38,26 @@ require_once("pfsense-utils.inc");
...
@@ -38,21 +38,26 @@ require_once("pfsense-utils.inc");
function
formInterfaces
()
{
function
formInterfaces
()
{
global
$config
;
global
$config
;
$interfaces
=
array
();
$interfaces
=
array
();
foreach
(
get_configured_interface_with_descr
(
false
,
true
)
as
$if
=>
$ifdesc
)
foreach
(
get_configured_interface_with_descr
(
false
,
true
)
as
$if
=>
$ifdesc
)
{
$interfaces
[
$if
]
=
$ifdesc
;
$interfaces
[
$if
]
=
$ifdesc
;
}
if
(
isset
(
$config
[
'l2tp'
][
'mode'
])
&&
$config
[
'l2tp'
][
'mode'
]
==
"server"
)
if
(
isset
(
$config
[
'l2tp'
][
'mode'
])
&&
$config
[
'l2tp'
][
'mode'
]
==
"server"
)
{
$interfaces
[
'l2tp'
]
=
"L2TP VPN"
;
$interfaces
[
'l2tp'
]
=
"L2TP VPN"
;
}
if
(
isset
(
$config
[
'pptpd'
][
'mode'
])
&&
$config
[
'pptpd'
][
'mode'
]
==
"server"
)
if
(
isset
(
$config
[
'pptpd'
][
'mode'
])
&&
$config
[
'pptpd'
][
'mode'
]
==
"server"
)
{
$interfaces
[
'pptp'
]
=
"PPTP VPN"
;
$interfaces
[
'pptp'
]
=
"PPTP VPN"
;
}
if
(
is_pppoe_server_enabled
())
if
(
is_pppoe_server_enabled
())
{
$interfaces
[
'pppoe'
]
=
"PPPoE VPN"
;
$interfaces
[
'pppoe'
]
=
"PPPoE VPN"
;
}
/* add ipsec interfaces */
/* add ipsec interfaces */
if
(
isset
(
$config
[
'ipsec'
][
'enable'
])
||
isset
(
$config
[
'ipsec'
][
'client'
][
'enable'
]))
if
(
isset
(
$config
[
'ipsec'
][
'enable'
])
||
isset
(
$config
[
'ipsec'
][
'client'
][
'enable'
]))
{
$interfaces
[
"enc0"
]
=
"IPsec"
;
$interfaces
[
"enc0"
]
=
"IPsec"
;
}
/* add openvpn/tun interfaces */
/* add openvpn/tun interfaces */
if
(
isset
(
$config
[
'openvpn'
][
'openvpn-server'
])
||
isset
(
$config
[
'openvpn'
][
'openvpn-client'
]))
{
if
(
isset
(
$config
[
'openvpn'
][
'openvpn-server'
])
||
isset
(
$config
[
'openvpn'
][
'openvpn-client'
]))
{
...
...
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