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
bdd2b263
Commit
bdd2b263
authored
Nov 27, 2015
by
Franco Fichtner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
filter: pass it on; pass it right on
parent
72cf2e19
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
11 deletions
+7
-11
filter.inc
src/etc/inc/filter.inc
+7
-11
No files found.
src/etc/inc/filter.inc
View file @
bdd2b263
...
...
@@ -1062,16 +1062,16 @@ function filter_get_reflection_interfaces(&$FilterIflist, $natif = '')
return
$nat_if_list
;
}
function
filter_generate_reflection_nat
(
$rule
,
&
$route_table
,
$nat_ifs
,
$protocol
,
$target
,
$target_ip
,
$target_subnet
=
""
)
{
function
filter_generate_reflection_nat
(
&
$FilterIflist
,
$rule
,
&
$route_table
,
$nat_ifs
,
$protocol
,
$target
,
$target_ip
,
$target_subnet
=
''
)
{
global
$config
;
$FilterIflist
=
filter_generate_optcfg_array
()
;
if
(
!
isset
(
$config
[
'system'
][
'enablenatreflectionhelper'
]))
{
return
""
;
if
(
!
isset
(
$config
[
'system'
][
'enablenatreflectionhelper'
]))
{
return
''
;
}
// Initialize natrules holder string
$natrules
=
""
;
$natrules
=
''
;
update_filter_reload_status
(
sprintf
(
gettext
(
"Creating reflection NAT rule for %s..."
),
$rule
[
'descr'
]));
...
...
@@ -1701,7 +1701,7 @@ function filter_nat_rules_generate(&$FilterIflist)
}
$nat_if_list
=
array_merge
(
array
(
$natif
),
$nat_if_list
);
$reflection_txt
.=
filter_generate_reflection_nat
(
$
rule
,
$route_table
,
$nat_if_list
,
""
,
$srcaddr
,
$srcip
,
$sn
);
$reflection_txt
.=
filter_generate_reflection_nat
(
$
FilterIflist
,
$rule
,
$route_table
,
$nat_if_list
,
''
,
$srcaddr
,
$srcip
,
$sn
);
}
}
...
...
@@ -2097,7 +2097,7 @@ function filter_nat_rules_generate(&$FilterIflist)
$natrules
.=
"
\n
"
;
if
(
!
isset
(
$rule
[
'nordr'
]))
{
$natrules
.=
filter_generate_reflection_nat
(
$rule
,
$route_table
,
$nat_if_list
,
$protocol
,
"
{
$target
}{
$localport_nat
}
"
,
$target_ip
);
$natrules
.=
filter_generate_reflection_nat
(
$
FilterIflist
,
$
rule
,
$route_table
,
$nat_if_list
,
$protocol
,
"
{
$target
}{
$localport_nat
}
"
,
$target_ip
);
}
}
}
...
...
@@ -3783,7 +3783,3 @@ function default_state_size()
return
$max_states
;
}
?>
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