diff --git a/src/www/firewall_rules.php b/src/www/firewall_rules.php index e674d498e..ca481880b 100644 --- a/src/www/firewall_rules.php +++ b/src/www/firewall_rules.php @@ -115,18 +115,18 @@ function firewall_rule_item_proto($filterent) "mtraceresp" => gettext("mtrace response"), "mtrace" => gettext("mtrace messages") ); - if (isset($filterent['protocol']) && $filterent['protocol'] == 'icmp' && !empty($filterent['icmptype'])) { + if (isset($filterent['protocol']) && $filterent['protocol'] == 'icmp') { $result = $record_ipprotocol; - $icmplabel = $icmptypes[$filterent['icmptype']] ?? $filterent['icmptype']; + $icmplabel = $icmptypes[$filterent['icmptype'] ?? ''] ?? $filterent['icmptype']; $result .= sprintf( '%s', html_safe($icmplabel), isset($filterent['protocol']) ? strtoupper($filterent['protocol']) : '*' ); return $result; - } elseif (isset($filterent['protocol']) && !empty($filterent['icmp6-type'])) { + } elseif (isset($filterent['protocol']) && $filterent['protocol'] == 'ipv6-icmp') { $result = $record_ipprotocol; - $icmplabel = $icmp6types[$filterent['icmp6-type']] ?? $filterent['icmp6-type']; + $icmplabel = $icmp6types[$filterent['icmp6-type'] ?? ''] ?? $filterent['icmp6-type']; $result .= sprintf( '%s', html_safe($icmplabel),