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
8fea4d96
Commit
8fea4d96
authored
Nov 27, 2015
by
Franco Fichtner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
filter: nat outbound page is looking sad now
parent
b4ef16cb
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
6 deletions
+10
-6
filter.inc
src/etc/inc/filter.inc
+2
-3
firewall_nat_out.php
src/www/firewall_nat_out.php
+8
-3
No files found.
src/etc/inc/filter.inc
View file @
8fea4d96
...
...
@@ -1490,10 +1490,9 @@ function filter_nat_rules_automatic_tonathosts(&$filterIflist, $with_descr = fal
}
}
function
filter_nat_rules_outbound_automatic
(
$src
)
function
filter_nat_rules_outbound_automatic
(
&
$FilterIflist
,
$src
)
{
global
$config
;
$FilterIflist
=
filter_generate_optcfg_array
()
;
$rules
=
array
();
...
...
@@ -1851,7 +1850,7 @@ function filter_nat_rules_generate(&$FilterIflist)
$macroortable
=
"
\$
tonatsubnets"
;
}
$a_outs
=
filter_nat_rules_outbound_automatic
(
$macroortable
);
$a_outs
=
filter_nat_rules_outbound_automatic
(
$
FilterIflist
,
$
macroortable
);
foreach
(
$a_outs
as
$a_out
)
{
$natrules
.=
filter_nat_rules_generate_if
(
$a_out
[
'interface'
],
...
...
src/www/firewall_nat_out.php
View file @
8fea4d96
...
...
@@ -74,9 +74,11 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
if
(
empty
(
$GatewaysList
))
{
filter_generate_gateways
();
}
/* XXX cranky low-level call, please refactor */
$tonathosts
=
filter_nat_rules_automatic_tonathosts
(
filter_generate_optcfg_array
(),
true
);
$automatic_rules
=
filter_nat_rules_outbound_automatic
(
""
);
$FilterIflist
=
filter_generate_optcfg_array
();
$tonathosts
=
filter_nat_rules_automatic_tonathosts
(
$FilterIflist
,
true
);
$automatic_rules
=
filter_nat_rules_outbound_automatic
(
$FilterIflist
,
''
);
foreach
(
$tonathosts
as
$tonathost
)
{
foreach
(
$automatic_rules
as
$natent
)
{
...
...
@@ -481,7 +483,10 @@ include("head.inc");
if
(
empty
(
$GatewaysList
))
filter_generate_gateways
();
/* XXX cranky low-level call, please refactor */
$automatic_rules
=
filter_nat_rules_outbound_automatic
(
implode
(
" "
,
filter_nat_rules_automatic_tonathosts
(
filter_generate_optcfg_array
())));
$FilterIflist
=
filter_generate_optcfg_array
();
$automatic_rules
=
filter_nat_rules_outbound_automatic
(
$FilterIflist
,
implode
(
' '
,
filter_nat_rules_automatic_tonathosts
(
$FilterIflist
))
);
unset
(
$GatewaysList
);
?>
<section
class=
"col-xs-12"
>
...
...
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