summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhil Davis <phil.davis@inf.org>2017-01-13 12:39:44 +0545
committerGitHub <noreply@github.com>2017-01-13 12:39:44 +0545
commit007cfb6ab6d7733c7a98d8fc5baae59028753107 (patch)
tree3c7df34592ce689cec33afdf1511300e42be1404
parentc1f1072e147e2b77fc1bbf7d6230267b9d340c83 (diff)
downloadpfsense-007cfb6ab6d7733c7a98d8fc5baae59028753107.zip
pfsense-007cfb6ab6d7733c7a98d8fc5baae59028753107.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.
-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 5ef62cb..03c1338 100644
--- a/src/etc/inc/filter.inc
+++ b/src/etc/inc/filter.inc
@@ -2784,7 +2784,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