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
ac00e7f3
Commit
ac00e7f3
authored
Aug 20, 2016
by
Franco Fichtner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ipsec: another round of style fixes
Suggested by: @fabianfrz
parent
fb5e7863
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
ipsec.inc
src/etc/inc/ipsec.inc
+5
-5
No files found.
src/etc/inc/ipsec.inc
View file @
ac00e7f3
...
@@ -83,7 +83,7 @@ $p2_pfskeygroups = array(
...
@@ -83,7 +83,7 @@ $p2_pfskeygroups = array(
/*
/*
* Return phase1 local address
* Return phase1 local address
*/
*/
function
ipsec_get_phase1_src
(
&
$ph1ent
)
function
ipsec_get_phase1_src
(
&
$ph1ent
)
{
{
if
(
!
empty
(
$ph1ent
[
'interface'
]))
{
if
(
!
empty
(
$ph1ent
[
'interface'
]))
{
if
(
$ph1ent
[
'interface'
]
==
'any'
)
{
if
(
$ph1ent
[
'interface'
]
==
'any'
)
{
...
@@ -429,7 +429,7 @@ function ipsec_configure()
...
@@ -429,7 +429,7 @@ function ipsec_configure()
$a_phase1
=
isset
(
$config
[
'ipsec'
][
'phase1'
])
?
$config
[
'ipsec'
][
'phase1'
]
:
array
();
$a_phase1
=
isset
(
$config
[
'ipsec'
][
'phase1'
])
?
$config
[
'ipsec'
][
'phase1'
]
:
array
();
$a_phase2
=
isset
(
$config
[
'ipsec'
][
'phase2'
])
?
$config
[
'ipsec'
][
'phase2'
]
:
array
();
$a_phase2
=
isset
(
$config
[
'ipsec'
][
'phase2'
])
?
$config
[
'ipsec'
][
'phase2'
]
:
array
();
$a_client
=
isset
(
$config
[
'ipsec'
][
'client'
])
?
$config
[
'ipsec'
][
'client'
]
:
array
();
$a_client
=
isset
(
$config
[
'ipsec'
][
'client'
])
?
$config
[
'ipsec'
][
'client'
]
:
array
();
$aggressive_psk
=
false
;
// if one of the phase 1 entries has aggressive/psk combination, this will be set true
$aggressive_psk
=
false
;
// if one of the phase 1 entries has aggressive/psk combination, this will be set true
if
(
!
isset
(
$ipseccfg
[
'enable'
]))
{
if
(
!
isset
(
$ipseccfg
[
'enable'
]))
{
/* try to stop charon */
/* try to stop charon */
...
@@ -814,7 +814,7 @@ EOD;
...
@@ -814,7 +814,7 @@ EOD;
foreach
(
$ipsec_loglevels
as
$lkey
=>
$ldescr
)
{
foreach
(
$ipsec_loglevels
as
$lkey
=>
$ldescr
)
{
if
(
isset
(
$config
[
'ipsec'
][
"ipsec_
{
$lkey
}
"
])
&&
is_numeric
(
$config
[
'ipsec'
][
"ipsec_
{
$lkey
}
"
])
&&
if
(
isset
(
$config
[
'ipsec'
][
"ipsec_
{
$lkey
}
"
])
&&
is_numeric
(
$config
[
'ipsec'
][
"ipsec_
{
$lkey
}
"
])
&&
intval
(
$config
[
'ipsec'
][
"ipsec_
{
$lkey
}
"
])
>=
1
&&
intval
(
$config
[
'ipsec'
][
"ipsec_
{
$lkey
}
"
])
<=
5
)
{
intval
(
$config
[
'ipsec'
][
"ipsec_
{
$lkey
}
"
])
>=
1
&&
intval
(
$config
[
'ipsec'
][
"ipsec_
{
$lkey
}
"
])
<=
5
)
{
$cfg_loglevels
[]
=
"${lkey} "
.
(
intval
(
$config
[
'ipsec'
][
"ipsec_
{
$lkey
}
"
])
-
1
)
;
$cfg_loglevels
[]
=
"${lkey} "
.
(
intval
(
$config
[
'ipsec'
][
"ipsec_
{
$lkey
}
"
])
-
1
);
}
}
}
}
}
}
...
@@ -951,7 +951,7 @@ EOD;
...
@@ -951,7 +951,7 @@ EOD;
$rekey
=
"rekey = yes"
;
$rekey
=
"rekey = yes"
;
}
}
$forceencaps
=
'forceencaps = no'
;
$forceencaps
=
'forceencaps = no'
;
if
(
!
empty
(
$ph1ent
[
'nat_traversal'
])
&&
$ph1ent
[
'nat_traversal'
]
==
'force'
)
{
if
(
!
empty
(
$ph1ent
[
'nat_traversal'
])
&&
$ph1ent
[
'nat_traversal'
]
==
'force'
)
{
$forceencaps
=
'forceencaps = yes'
;
$forceencaps
=
'forceencaps = yes'
;
}
}
...
@@ -1148,7 +1148,7 @@ EOD;
...
@@ -1148,7 +1148,7 @@ EOD;
// suffix connection with sequence number
// suffix connection with sequence number
$tmpconf
=
str_replace
(
'<<connectionId>>'
,
sprintf
(
'%s-%03d'
,
$ph1ent
[
'ikeid'
],
$idx
),
$connEntry
);
$tmpconf
=
str_replace
(
'<<connectionId>>'
,
sprintf
(
'%s-%03d'
,
$ph1ent
[
'ikeid'
],
$idx
),
$connEntry
);
}
}
$tmpconf
.=
"
\t
rightsubnet = "
.
$rightsubnet_spec
[
$idx
]
.
"
\n
"
;
$tmpconf
.=
"
\t
rightsubnet = "
.
$rightsubnet_spec
[
$idx
]
.
"
\n
"
;
$tmpconf
.=
"
\t
leftsubnet = "
.
$leftsubnet_spec
[
$idx
]
.
"
\n
"
;
$tmpconf
.=
"
\t
leftsubnet = "
.
$leftsubnet_spec
[
$idx
]
.
"
\n
"
;
if
(
!
empty
(
$ealgoESPsp2arr
[
$idx
]))
{
if
(
!
empty
(
$ealgoESPsp2arr
[
$idx
]))
{
$tmpconf
.=
"
\t
esp = "
.
join
(
','
,
$ealgoESPsp2arr
[
$idx
])
.
"!
\n
"
;
$tmpconf
.=
"
\t
esp = "
.
join
(
','
,
$ealgoESPsp2arr
[
$idx
])
.
"!
\n
"
;
...
...
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