summaryrefslogtreecommitdiffstats
path: root/usr
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2005-06-21 23:52:23 +0000
committerScott Ullrich <sullrich@pfsense.org>2005-06-21 23:52:23 +0000
commitc60f17e085a3d260c2d4cd962a640b25f1388d8e (patch)
treebb2b6e80ef6b423a33ce5c0655257b1f99d03245 /usr
parent35a67a47bef59dfceab319efae451a5473d0a6f7 (diff)
downloadpfsense-c60f17e085a3d260c2d4cd962a640b25f1388d8e.zip
pfsense-c60f17e085a3d260c2d4cd962a640b25f1388d8e.tar.gz
sync w/ m0n0wall
Diffstat (limited to 'usr')
-rwxr-xr-xusr/local/www/guiconfig.inc74
1 files changed, 1 insertions, 73 deletions
diff --git a/usr/local/www/guiconfig.inc b/usr/local/www/guiconfig.inc
index 4623076..e43dff1 100755
--- a/usr/local/www/guiconfig.inc
+++ b/usr/local/www/guiconfig.inc
@@ -512,76 +512,4 @@ function update_if_changed($varname, & $orig, $new) {
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 {
- if(alias_expand($pbeginport) <> "" || alias_expand($pendport) <> "") {
- /* Item is a port alias */
- } else {
- $pbeginport = "any";
- $pendport = "any";
- }
- }
-}
-
-
-function pconfig_to_address(&$adr, $padr, $pmask, $pnot=false, $pbeginport=0, $pendport=0) {
-
- $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;
- }
-
- if ($pnot)
- $adr['not'] = true;
- else
- unset($addr['not']);
-
- if (($pbeginport != 0) && ($pbeginport != "any")) {
- if ($pbeginport != $pendport)
- $adr['port'] = $pbeginport . "-" . $pendport;
- else
- $adr['port'] = $pbeginport;
- }
-
- if(alias_expand($pbeginport)) {
- $adr['port'] = $pbeginport;
- }
-}
-
-function is_specialnet($net) {
- global $specialsrcdst;
-
- if (in_array($net, $specialsrcdst) || strstr($net, "opt"))
- return true;
- else
- return false;
-}
-
-?>
+?> \ No newline at end of file
OpenPOWER on IntegriCloud