summaryrefslogtreecommitdiffstats
path: root/usr/local/www/firewall_shaper_edit.php
diff options
context:
space:
mode:
authorBill Marquette <billm@pfsense.org>2005-05-15 22:35:06 +0000
committerBill Marquette <billm@pfsense.org>2005-05-15 22:35:06 +0000
commit23a8ad04474bfdba690024314ccf2097b8ee754f (patch)
treec05d717299273613928d76fd072956d5d667a8d7 /usr/local/www/firewall_shaper_edit.php
parente2cb6b50972de11c26f8a6eb482e37893d65d526 (diff)
downloadpfsense-23a8ad04474bfdba690024314ccf2097b8ee754f.zip
pfsense-23a8ad04474bfdba690024314ccf2097b8ee754f.tar.gz
Remove duplicate code
Diffstat (limited to 'usr/local/www/firewall_shaper_edit.php')
-rwxr-xr-xusr/local/www/firewall_shaper_edit.php51
1 files changed, 0 insertions, 51 deletions
diff --git a/usr/local/www/firewall_shaper_edit.php b/usr/local/www/firewall_shaper_edit.php
index b3f6e02..059a6a9 100755
--- a/usr/local/www/firewall_shaper_edit.php
+++ b/usr/local/www/firewall_shaper_edit.php
@@ -61,57 +61,6 @@ function is_specialnet($net) {
return false;
}
-function address_to_pconfig($adr, &$padr, &$pmask, &$pnot, &$pbeginport, &$pendport) {
-
- if (isset($adr['any']))
- $padr = "any";
- else if ($adr['network'])
- $padr = $adr['network'];
- else if ($adr['address']) {
- list($padr, $pmask) = explode("/", $adr['address']);
- if (!$pmask)
- $pmask = 32;
- }
-
- if (isset($adr['not']))
- $pnot = 1;
- else
- $pnot = 0;
-
- if ($adr['port']) {
- list($pbeginport, $pendport) = explode("-", $adr['port']);
- if (!$pendport)
- $pendport = $pbeginport;
- } else {
- $pbeginport = "any";
- $pendport = "any";
- }
-}
-
-function pconfig_to_address(&$adr, $padr, $pmask, $pnot, $pbeginport, $pendport) {
-
- $adr = array();
-
- if ($padr == "any")
- $adr['any'] = true;
- else if (is_specialnet($padr))
- $adr['network'] = $padr;
- else {
- $adr['address'] = $padr;
- if ($pmask != 32)
- $adr['address'] .= "/" . $pmask;
- }
-
- $adr['not'] = $pnot ? true : false;
-
- if (($pbeginport != 0) && ($pbeginport != "any")) {
- if ($pbeginport != $pendport)
- $adr['port'] = $pbeginport . "-" . $pendport;
- else
- $adr['port'] = $pbeginport;
- }
-}
-
if (isset($id) && $a_shaper[$id]) {
$pconfig['interface'] = $a_shaper[$id]['interface'];
OpenPOWER on IntegriCloud