summaryrefslogtreecommitdiffstats
path: root/usr/local/www/firewall_rules.php
diff options
context:
space:
mode:
authorRenato Botelho <garga@FreeBSD.org>2014-12-11 19:47:05 -0200
committerRenato Botelho <garga@FreeBSD.org>2014-12-11 19:47:05 -0200
commitd3bf4a4163c50146a18cbb6cebe87d8d9a453afe (patch)
tree19e7df5a846defbf9b7b9ad1b10b41a867796866 /usr/local/www/firewall_rules.php
parent0ab1f1078c2e285efa44db4c35b00fbdfd41283b (diff)
downloadpfsense-d3bf4a4163c50146a18cbb6cebe87d8d9a453afe.zip
pfsense-d3bf4a4163c50146a18cbb6cebe87d8d9a453afe.tar.gz
Split ICMP and ICMPv6 types on Firewall Rules
- Remove redundant declaration of $icmptypes and move it to a common place (filter.inc) - Add missing ICMP types for v4 - Add ICMPv6 types - Adjust javascripts to show correct options depending of IP Protocol - Hide ICMP type selection when protocol is IPv4+v6 It fixes #3389
Diffstat (limited to 'usr/local/www/firewall_rules.php')
-rw-r--r--usr/local/www/firewall_rules.php24
1 files changed, 3 insertions, 21 deletions
diff --git a/usr/local/www/firewall_rules.php b/usr/local/www/firewall_rules.php
index fe98195..250ce64 100644
--- a/usr/local/www/firewall_rules.php
+++ b/usr/local/www/firewall_rules.php
@@ -123,26 +123,6 @@ if($_REQUEST['dragdroporder']) {
exit;
}
-$icmptypes = array(
- "" => gettext("any"),
- "echoreq" => gettext("Echo request"),
- "echorep" => gettext("Echo reply"),
- "unreach" => gettext("Destination unreachable"),
- "squench" => gettext("Source quench"),
- "redir" => gettext("Redirect"),
- "althost" => gettext("Alternate Host"),
- "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)
@@ -714,7 +694,9 @@ if($_REQUEST['undodrag']) {
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 ' <span style="cursor: help;" title="ICMP type: ' .
+ ( $filterent['ipprotocol'] == "inet6" ? $icmp6types[$filterent['icmptype']] : $icmptypes[$filterent['icmptype']] ) .
+ '"><u>';
echo $filterent['icmptype'];
echo '</u></span>';
}
OpenPOWER on IntegriCloud