Add error when ICMP specifies SOURCE PORT(S) in tcfilters file

git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@8331 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
teastep 2008-03-22 03:01:01 +00:00
parent 6c0d7d055d
commit 3bf59ff03a

View File

@ -607,6 +607,8 @@ sub process_tc_filter( $$$$$$ ) {
for my $portrange ( split_list $portlist, 'port list' ) {
if ( $protonumber == ICMP ) {
fatal_error "SOURCE PORT(S) are not allowed with ICMP" if $sportlist ne '-';
my ( $icmptype , $icmpcode ) = split '//', validate_icmp( $portrange );
$icmptype = in_hex2 numeric_value $icmptype;