diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2005-06-21 23:52:23 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2005-06-21 23:52:23 +0000 |
commit | c60f17e085a3d260c2d4cd962a640b25f1388d8e (patch) | |
tree | bb2b6e80ef6b423a33ce5c0655257b1f99d03245 /usr/local/www/guiconfig.inc | |
parent | 35a67a47bef59dfceab319efae451a5473d0a6f7 (diff) | |
download | pfsense-c60f17e085a3d260c2d4cd962a640b25f1388d8e.zip pfsense-c60f17e085a3d260c2d4cd962a640b25f1388d8e.tar.gz |
sync w/ m0n0wall
Diffstat (limited to 'usr/local/www/guiconfig.inc')
-rwxr-xr-x | usr/local/www/guiconfig.inc | 74 |
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 |