From 990d6e504d2753505662adca5a339f96de45071f Mon Sep 17 00:00:00 2001 From: Tom Eastep Date: Mon, 19 Sep 2011 10:05:58 -0700 Subject: [PATCH] Correct icmp-type and icmpv6-type --- Shorewall/Perl/Shorewall/Chains.pm | 44 ++++++++++++++++-------------- 1 file changed, 24 insertions(+), 20 deletions(-) diff --git a/Shorewall/Perl/Shorewall/Chains.pm b/Shorewall/Perl/Shorewall/Chains.pm index 31483c31c..4b9e0f46e 100644 --- a/Shorewall/Perl/Shorewall/Chains.pm +++ b/Shorewall/Perl/Shorewall/Chains.pm @@ -446,31 +446,33 @@ use constant { UNIQUE => 1, MATCH => 8, CONTROL => 16 }; -my %opttype = ( rule => CONTROL, - cmd => CONTROL, +my %opttype = ( rule => CONTROL, + cmd => CONTROL, - dhcp => UNIQUE, + dhcp => UNIQUE, - mode => CONTROL, - cmdlevel => CONTROL, - simple => CONTROL, + mode => CONTROL, + cmdlevel => CONTROL, + simple => CONTROL, - i => UNIQUE, - s => UNIQUE, - o => UNIQUE, - d => UNIQUE, - p => UNIQUE, - dport => UNIQUE, - sport => UNIQUE, + i => UNIQUE, + s => UNIQUE, + o => UNIQUE, + d => UNIQUE, + p => UNIQUE, + dport => UNIQUE, + sport => UNIQUE, + 'icmp-type' => UNIQUE, + 'icmpv6-type' => UNIQUE, - comment => CONTROL, + comment => CONTROL, - policy => MATCH, - state => EXCLUSIVE, + policy => MATCH, + state => EXCLUSIVE, - jump => TARGET, - target => TARGET, - targetopts => TARGET, + jump => TARGET, + target => TARGET, + targetopts => TARGET, ); my %aliases = ( protocol => 'p', @@ -482,9 +484,11 @@ my %aliases = ( protocol => 'p', 'out-interface' => 'o', dport => 'dport', sport => 'sport', + 'icmp-type' => 'icmp-type', + 'icmpv6-type' => 'icmpv6-type', ); -my @unique_options = ( qw/p dport sport s d i o/ ); +my @unique_options = ( qw/p dport sport icmp-type icmpv6-type s d i o/ ); # # Rather than initializing globals in an INIT block or during declaration,