mirror of
https://gitlab.com/shorewall/code.git
synced 2024-12-24 15:18:53 +01:00
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:
parent
ad8af3d5c3
commit
84760edb73
@ -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)"
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user