Project

General

Profile

« Previous | Next » 

Revision 007cfb6a

Added by Phil Davis over 8 years ago

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.

View differences:

src/etc/inc/filter.inc
2784 2784
	}
2785 2785
	$aline['dst'] = "to $dst ";
2786 2786

  
2787
	if ($rule['protocol'] == "icmp" && $rule['icmptype']) {
2787
	if ($rule['protocol'] == "icmp" && $rule['icmptype'] && ($rule['icmptype'] != 'any')) {
2788 2788
		$icmptype_key = ($rule['ipprotocol'] == 'inet6' ? 'icmp6-type' : 'icmp-type');
2789 2789
		$icmptype_text = (strpos($rule['icmptype'], ",") === false ? $rule['icmptype'] : '{ ' . $rule['icmptype'] . ' }');
2790 2790
		$aline[$icmptype_key] = "{$icmptype_key} {$icmptype_text} ";

Also available in: Unified diff