From e1568616a176805bf4f4a7b75369100a4b5a1a09 Mon Sep 17 00:00:00 2001 From: Phil Davis Date: Fri, 13 Jan 2017 12:39:44 +0545 Subject: Fix #7118 icmp-type any When 'any' is selected as the ICMP type, do not write 'icmp-type any' in the rule, just leave it out. --- src/etc/inc/filter.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/etc/inc/filter.inc b/src/etc/inc/filter.inc index fecfba2..e003e33 100644 --- a/src/etc/inc/filter.inc +++ b/src/etc/inc/filter.inc @@ -2818,7 +2818,7 @@ function filter_generate_user_rule($rule) { } $aline['dst'] = "to $dst "; - if ($rule['protocol'] == "icmp" && $rule['icmptype']) { + if ($rule['protocol'] == "icmp" && $rule['icmptype'] && ($rule['icmptype'] != 'any')) { $icmptype_key = ($rule['ipprotocol'] == 'inet6' ? 'icmp6-type' : 'icmp-type'); $icmptype_text = (strpos($rule['icmptype'], ",") === false ? $rule['icmptype'] : '{ ' . $rule['icmptype'] . ' }'); $aline[$icmptype_key] = "{$icmptype_key} {$icmptype_text} "; -- cgit v1.1