diff options
author | Ermal Luçi <eri@pfsense.org> | 2008-06-21 14:44:30 +0000 |
---|---|---|
committer | Ermal Luçi <eri@pfsense.org> | 2008-06-21 14:44:30 +0000 |
commit | cbe3ea96403e554822bd4675cb5565d20ab55fa7 (patch) | |
tree | c96401ee12ee200acbd111194e108cc6c92b4ac2 /usr/local/www/firewall_nat_out.php | |
parent | 1ad25a3ffbf9ad226d8cb3463ef46c2ff82ad936 (diff) | |
download | pfsense-cbe3ea96403e554822bd4675cb5565d20ab55fa7.zip pfsense-cbe3ea96403e554822bd4675cb5565d20ab55fa7.tar.gz |
Continue interface improvements
Diffstat (limited to 'usr/local/www/firewall_nat_out.php')
-rwxr-xr-x | usr/local/www/firewall_nat_out.php | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/usr/local/www/firewall_nat_out.php b/usr/local/www/firewall_nat_out.php index 9cfffcd..99fc3f7 100755 --- a/usr/local/www/firewall_nat_out.php +++ b/usr/local/www/firewall_nat_out.php @@ -79,25 +79,15 @@ if (isset($_POST['save']) && $_POST['save'] == "Save") { * user has enabled advanced outbound nat -- lets automatically create entries * for all of the interfaces to make life easier on the pip-o-chap */ - $ifdescrs = array('lan'); - for ($j = 1; isset($config['interfaces']['opt' . $j]); $j++) - $ifdescrs[] = "opt" . $j; - foreach($ifdescrs as $if) { - if($if <> "lan" and $if <> "wan") { - /* interface is an optional. is it enabled? */ - if(!isset($config['interfaces'][$if]['enabled'])) { - continue; - } - } + $ifdescrs = get_configured_interface_with_descr(); + + foreach($ifdescrs as $if => $ifdesc) { $natent = array(); $osn = gen_subnet($config['interfaces'][$if]['ipaddr'], $config['interfaces'][$if]['subnet']); $natent['source']['network'] = $osn . "/" . $config['interfaces'][$if]['subnet']; $natent['sourceport'] = ""; - $int_description = $config['interfaces'][$if]['descr']; - if($if == "lan") - $int_description = "LAN"; - $natent['descr'] = "Auto created rule for {$int_description}"; + $natent['descr'] = "Auto created rule for {$ifdesc}"; $natent['target'] = ""; $natent['interface'] = "wan"; $natent['destination']['any'] = true; |