summaryrefslogtreecommitdiffstats
path: root/usr
diff options
context:
space:
mode:
authorErik Fonnesbeck <efonnes@gmail.com>2010-10-21 20:35:29 -0600
committerErik Fonnesbeck <efonnes@gmail.com>2010-10-21 21:49:52 -0600
commitbe81b340240000c350895aa5c3e2840e9d7632ee (patch)
tree0cb1a2542f2f77bdb272cfd4cf811d67ee8b8337 /usr
parentfc3e88f19fb40f56c661997274b9ea8d52851095 (diff)
downloadpfsense-be81b340240000c350895aa5c3e2840e9d7632ee.zip
pfsense-be81b340240000c350895aa5c3e2840e9d7632ee.tar.gz
Display the ICMP type (abbreviated) in the firewall rule list and show the full text when the cursor is over it for ticket #762
Diffstat (limited to 'usr')
-rwxr-xr-xusr/local/www/firewall_rules.php31
1 files changed, 30 insertions, 1 deletions
diff --git a/usr/local/www/firewall_rules.php b/usr/local/www/firewall_rules.php
index 616bc10..cdd417a 100755
--- a/usr/local/www/firewall_rules.php
+++ b/usr/local/www/firewall_rules.php
@@ -118,6 +118,26 @@ if($_REQUEST['dragdroporder']) {
exit;
}
+$icmptypes = array(
+ "" => gettext("any"),
+ "echorep" => gettext("Echo reply"),
+ "unreach" => gettext("Destination unreachable"),
+ "squench" => gettext("Source quench"),
+ "redir" => gettext("Redirect"),
+ "althost" => gettext("Alternate Host"),
+ "echoreq" => gettext("Echo"),
+ "routeradv" => gettext("Router advertisement"),
+ "routersol" => gettext("Router solicitation"),
+ "timex" => gettext("Time exceeded"),
+ "paramprob" => gettext("Invalid IP header"),
+ "timereq" => gettext("Timestamp"),
+ "timerep" => gettext("Timestamp reply"),
+ "inforeq" => gettext("Information request"),
+ "inforep" => gettext("Information reply"),
+ "maskreq" => gettext("Address mask request"),
+ "maskrep" => gettext("Address mask reply")
+);
+
/* add group interfaces */
if (is_array($config['ifgroups']['ifgroupentry']))
foreach($config['ifgroups']['ifgroupentry'] as $ifgen)
@@ -611,7 +631,16 @@ if($_REQUEST['undodrag']) {
<?=$textss;?><?php if (isset($filterent['id'])) echo $filterent['id']; else echo ""; ?><?=$textse;?>
</td>
<td class="listr" onClick="fr_toggle(<?=$nrules;?>)" id="frd<?=$nrules;?>" ondblclick="document.location='firewall_rules_edit.php?id=<?=$i;?>';">
- <?=$textss;?><?php if (isset($filterent['protocol'])) echo strtoupper($filterent['protocol']); else echo "*"; ?><?=$textse;?>
+ <?=$textss;?><?php
+ if (isset($filterent['protocol'])) {
+ echo strtoupper($filterent['protocol']);
+ if (strtoupper($filterent['protocol']) == "ICMP" && !empty($filterent['icmptype'])) {
+ echo ' <span style="cursor: help;" title="ICMP type: ' . $icmptypes[$filterent['icmptype']] . '"><u>';
+ echo $filterent['icmptype'];
+ echo '</u></span>';
+ }
+ } else echo "*";
+ ?><?=$textse;?>
</td>
<td class="listr" onClick="fr_toggle(<?=$nrules;?>)" id="frd<?=$nrules;?>" ondblclick="document.location='firewall_rules_edit.php?id=<?=$i;?>';">
<?=$textss;?><?php echo $alias_src_span_begin;?><?php echo htmlspecialchars(pprint_address($filterent['source']));?><?php echo $alias_src_span_end;?><?=$textse;?>
OpenPOWER on IntegriCloud