Fix remaining problems reported by Andras Sarkozy

git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@6157 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
teastep 2007-04-30 17:55:43 +00:00
parent 0b996cb556
commit f95a9e4db3
2 changed files with 34 additions and 35 deletions

View File

@ -818,7 +818,7 @@ sub do_proto( $$$ )
fatal_error 'SOURCE PORT(S) not permitted with ICMP' if $sports ne '';
} elsif ( $proto =~ /^(ipp2p(:(tcp|udp|all)))?$/i ) {
require_capability( 'IPP2P' , 'PROTO = ipp2p' );
require_capability( 'IPP2P_MATCH' , 'PROTO = ipp2p' );
$proto = $2 ? $3 : 'tcp';
$ports = 'ipp2p' unless $ports;
$output .= "-p $proto -m ipp2p --$ports ";

View File

@ -43,46 +43,46 @@ our @EXPORT = qw( setup_tc );
our @EXPORT_OK = qw( process_tc_rule );
our @VERSION = 1.00;
my %tcs = ( t => { chain => 'tcpost',
my %tcs = ( T => { chain => 'tcpost',
connmark => 0,
fw => 1
} ,
ct => { chain => 'tcpost' ,
CT => { chain => 'tcpost' ,
target => 'CONNMARK --set-mark' ,
connmark => 1 ,
fw => 1
} ,
c => { target => 'CONNMARK --set-mark' ,
C => { target => 'CONNMARK --set-mark' ,
connmark => 1 ,
fw => 1
} ,
p => { chain => 'tcpre' ,
P => { chain => 'tcpre' ,
connmark => 0 ,
fw => 0
} ,
cp => { chain => 'tcpre' ,
CP => { chain => 'tcpre' ,
target => 'CONNMARK --set-mark' ,
connmark => 1 ,
fw => 0
} ,
f => { chain => 'tcfor' ,
F => { chain => 'tcfor' ,
connmark => 0 ,
fw => 0
} ,
cf => { chain => 'tcfor' ,
CF => { chain => 'tcfor' ,
fw => 0 ,
connmark => 1 ,
} ,
t => { chain => 'tcpost' ,
T => { chain => 'tcpost' ,
connmark => 0 ,
fw => 0
} ,
ct => { chain => 'tcpost' ,
CT => { chain => 'tcpost' ,
target => 'CONNMARK --set-mark' ,
connmark => 1 ,
fw => 0
} ,
c => { target => 'CONNMARK --set-mark' ,
C => { target => 'CONNMARK --set-mark' ,
connmark => 1 ,
fw => 0
}
@ -166,8 +166,7 @@ sub process_tc_rule( $$$$$$$$$$ ) {
my ($cmd, $rest) = split '/', $mark;
unless ( $classid )
{
unless ( $classid ) {
MARK:
{
PATTERN:
@ -197,13 +196,13 @@ sub process_tc_rule( $$$$$$$$$$ ) {
last MARK;
}
}
}
validate_mark $mark;
fatal_error 'Marks < 256 may not be set in the PREROUTING chain when HIGH_ROUTE_MARKS=Yes'
if $cmd && $chain eq 'tcpre' && numeric_value( $cmd ) < 0xFF && $config{HIGH_ROUTE_MARKS};
}
}
expand_rule
ensure_chain( 'mangle' , $chain ) ,