More careful editing of icmp types

git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@6645 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
teastep 2007-06-22 14:47:16 +00:00
parent ad8af3d5c3
commit 84760edb73

View File

@ -850,7 +850,11 @@ sub validate_icmp( $ ) {
my $value = $icmp_types{$type};
return $value if defined $value;
return $type if $type =~ /^(\d+)(\/\d+)?$/;
if ( $type =~ /^(\d+)(\/(\d+))?$/ ) {
return $type if $1 < 256 && ( ! $2 || $3 < 256 );
}
fatal_error "Invalid ICMP Type ($type)"
}