diff options
author | Ermal Luçi <eri@pfsense.org> | 2008-01-16 22:52:27 +0000 |
---|---|---|
committer | Ermal Luçi <eri@pfsense.org> | 2008-01-16 22:52:27 +0000 |
commit | 92125c97b95c34e19f04a7bd24b0c018267c9c7e (patch) | |
tree | 17cb490c92050dba4e2083fd8185c31e1eca4719 /usr/local/www/firewall_rules.php | |
parent | a16d0963f1af1dbfd71538e1365b0b86210eed4e (diff) | |
download | pfsense-92125c97b95c34e19f04a7bd24b0c018267c9c7e.zip pfsense-92125c97b95c34e19f04a7bd24b0c018267c9c7e.tar.gz |
* Fix many bugs itroduced with the new shaper code import.
* Introduce a new tab to the Firewall - Rules section called "floating rules" where you can create rules with direction/tag/tagged/quick keywords of PF.
* Improve input validation on the shaper code and the wizard.
* Change the logic in filter.inc by allowing the rules without the quick keyword to work propperly.
* ALso begin changing the logic of filter.inc default rulesto not use the quick keyword so they can be overriden in the GUI.
Diffstat (limited to 'usr/local/www/firewall_rules.php')
-rwxr-xr-x | usr/local/www/firewall_rules.php | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/usr/local/www/firewall_rules.php b/usr/local/www/firewall_rules.php index 461b97e..a92ddbf 100755 --- a/usr/local/www/firewall_rules.php +++ b/usr/local/www/firewall_rules.php @@ -68,9 +68,12 @@ if (isset($config['ipsec']['enable']) || isset($config['ipsec']['mobileclients'] if(have_ruleint_access("enc0")) $iflist["enc0"] = "IPsec"; -if (!$if || !isset($iflist[$if])) - foreach($iflist as $if => $ifname) - break; +if (!$if || !isset($iflist[$if])) { + if ("any" == $if) + $if = "GerneralRules"; + else if ("FloatingRules" != $if) + $if = "wan"; +} $security_url = "firewall_rules.php?if=". strtolower($if); if (!isSystemAdmin($HTTP_SERVER_VARS['AUTH_USER'])) { @@ -225,6 +228,11 @@ echo "<script type=\"text/javascript\" language=\"javascript\" src=\"/javascript <?php /* active tabs */ $tab_array = array(); + if ("FloatingRules" == $if) + $active = true; + else + $active = false; + $tab_array[] = array("Floating Rules", $active, "firewall_rules.php?if=FloatingRules"); $tabscounter = 0; $i = 0; foreach ($iflist as $ifent => $ifname) { if ($ifent == $if) $active = true; @@ -258,7 +266,9 @@ echo "<script type=\"text/javascript\" language=\"javascript\" src=\"/javascript $nrules = 0; for ($i = 0; isset($a_filter[$i]); $i++) { $filterent = $a_filter[$i]; - if ($filterent['interface'] != $if) + if ($filterent['interface'] != $if && !isset($filterent['floating'])) + continue; + if (isset($filterent['floating']) && "FloatingRules" != $if) continue; $nrules++; } @@ -328,8 +338,10 @@ echo "<script type=\"text/javascript\" language=\"javascript\" src=\"/javascript <?php endif; ?> <?php $nrules = 0; for ($i = 0; isset($a_filter[$i]); $i++): $filterent = $a_filter[$i]; - if ($filterent['interface'] != $if) - continue; + if ($filterent['interface'] != $if && !isset($filterent['floating'])) + continue; + if (isset($filterent['floating']) && "FloatingRules" != $if) + continue; ?> <tr valign="top" id="fr<?=$nrules;?>"> <td class="listt"><input type="checkbox" id="frc<?=$nrules;?>" name="rule[]" value="<?=$i;?>" onClick="fr_bgcolor('<?=$nrules;?>')" style="margin: 0; padding: 0; width: 15px; height: 15px;"></td> |