summaryrefslogtreecommitdiffstats
path: root/usr
diff options
context:
space:
mode:
authorBill Marquette <billm@pfsense.org>2005-05-16 02:23:08 +0000
committerBill Marquette <billm@pfsense.org>2005-05-16 02:23:08 +0000
commitf449d83ebf66288c2676b12df951fd9c0b602269 (patch)
tree5d092f2ae026f82660a0893d158368593be57c87 /usr
parent4a9918899508c7c12aabd8e1d03a3c9ff6b83a83 (diff)
downloadpfsense-f449d83ebf66288c2676b12df951fd9c0b602269.zip
pfsense-f449d83ebf66288c2676b12df951fd9c0b602269.tar.gz
remove duplicate code
Diffstat (limited to 'usr')
-rwxr-xr-xusr/local/www/firewall_nat_out_edit.php21
1 files changed, 3 insertions, 18 deletions
diff --git a/usr/local/www/firewall_nat_out_edit.php b/usr/local/www/firewall_nat_out_edit.php
index 522ba49..c0b0b17 100755
--- a/usr/local/www/firewall_nat_out_edit.php
+++ b/usr/local/www/firewall_nat_out_edit.php
@@ -44,27 +44,12 @@ $id = $_GET['id'];
if (isset($_POST['id']))
$id = $_POST['id'];
-function network_to_pconfig($adr, &$padr, &$pmask, &$pnot) {
-
- if (isset($adr['any']))
- $padr = "any";
- else if ($adr['network']) {
- list($padr, $pmask) = explode("/", $adr['network']);
- if (!$pmask)
- $pmask = 32;
- }
-
- if (isset($adr['not']))
- $pnot = 1;
- else
- $pnot = 0;
-}
-
if (isset($id) && $a_out[$id]) {
list($pconfig['source'],$pconfig['source_subnet']) = explode('/', $a_out[$id]['source']['network']);
$pconfig['sourceport'] = $a_out[$id]['sourceport'];
- network_to_pconfig($a_out[$id]['destination'], $pconfig['destination'],
- $pconfig['destination_subnet'], $pconfig['destination_not']);
+ address_to_pconfig($a_out[$id]['destination'], $pconfig['destination'],
+ $pconfig['destination_subnet'], $pconfig['destination_not'],
+ null, null);
$pconfig['natport'] = $a_out[$id]['natport'];
$pconfig['target'] = $a_out[$id]['target'];
$pconfig['interface'] = $a_out[$id]['interface'];
OpenPOWER on IntegriCloud