Commit 8fea4d96 authored by Franco Fichtner's avatar Franco Fichtner

filter: nat outbound page is looking sad now

parent b4ef16cb
...@@ -1490,10 +1490,9 @@ function filter_nat_rules_automatic_tonathosts(&$filterIflist, $with_descr = fal ...@@ -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 ; global $config ;
$FilterIflist = filter_generate_optcfg_array() ;
$rules = array(); $rules = array();
...@@ -1851,7 +1850,7 @@ function filter_nat_rules_generate(&$FilterIflist) ...@@ -1851,7 +1850,7 @@ function filter_nat_rules_generate(&$FilterIflist)
$macroortable = "\$tonatsubnets"; $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) { foreach ($a_outs as $a_out) {
$natrules .= filter_nat_rules_generate_if( $natrules .= filter_nat_rules_generate_if(
$a_out['interface'], $a_out['interface'],
......
...@@ -74,9 +74,11 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') { ...@@ -74,9 +74,11 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
if(empty($GatewaysList)) { if(empty($GatewaysList)) {
filter_generate_gateways(); filter_generate_gateways();
} }
/* XXX cranky low-level call, please refactor */ /* XXX cranky low-level call, please refactor */
$tonathosts = filter_nat_rules_automatic_tonathosts(filter_generate_optcfg_array(), true); $FilterIflist = filter_generate_optcfg_array();
$automatic_rules = filter_nat_rules_outbound_automatic(""); $tonathosts = filter_nat_rules_automatic_tonathosts($FilterIflist, true);
$automatic_rules = filter_nat_rules_outbound_automatic($FilterIflist, '');
foreach ($tonathosts as $tonathost) { foreach ($tonathosts as $tonathost) {
foreach ($automatic_rules as $natent) { foreach ($automatic_rules as $natent) {
...@@ -481,7 +483,10 @@ include("head.inc"); ...@@ -481,7 +483,10 @@ include("head.inc");
if(empty($GatewaysList)) if(empty($GatewaysList))
filter_generate_gateways(); filter_generate_gateways();
/* XXX cranky low-level call, please refactor */ /* 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); unset($GatewaysList);
?> ?>
<section class="col-xs-12"> <section class="col-xs-12">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment