summaryrefslogtreecommitdiffstats
path: root/src/etc
diff options
context:
space:
mode:
authorPhil Davis <phil.davis@inf.org>2017-01-13 12:39:44 +0545
committerRenato Botelho <renato@netgate.com>2017-01-16 11:54:43 -0200
commite1568616a176805bf4f4a7b75369100a4b5a1a09 (patch)
treec0a32ae19eda576f825fec975a853993b6508628 /src/etc
parent3661dfdc9d2bb217d6069c1078575828b1f29b45 (diff)
downloadpfsense-e1568616a176805bf4f4a7b75369100a4b5a1a09.zip
pfsense-e1568616a176805bf4f4a7b75369100a4b5a1a09.tar.gz
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.
Diffstat (limited to 'src/etc')
-rw-r--r--src/etc/inc/filter.inc2
1 files changed, 1 insertions, 1 deletions
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} ";
OpenPOWER on IntegriCloud