forked from extern/shorewall_code
Fix RHEL5 issue with route marking.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
8f52c9744e
commit
77f342b0e0
@ -118,13 +118,14 @@ sub initialize( $ ) {
|
||||
#
|
||||
sub setup_route_marking() {
|
||||
my $mask = in_hex( $globals{PROVIDER_MASK} );
|
||||
my $testmask = have_capability( 'XCONNMARK_MATCH' ) ? "/$mask" : '';
|
||||
|
||||
require_capability( $_ , q(The provider 'track' option) , 's' ) for qw/CONNMARK_MATCH CONNMARK/;
|
||||
|
||||
if ( $config{RESTORE_ROUTEMARKS} ) {
|
||||
add_ijump $mangle_table->{$_} , j => 'CONNMARK', targetopts => "--restore-mark --mask $mask" for qw/PREROUTING OUTPUT/;
|
||||
} else {
|
||||
add_ijump $mangle_table->{$_} , j => 'CONNMARK', targetopts => "--restore-mark --mask $mask", connmark => "! --mark 0/$mask" for qw/PREROUTING OUTPUT/;
|
||||
add_ijump $mangle_table->{$_} , j => 'CONNMARK', targetopts => "--restore-mark --mask $mask", connmark => "! --mark 0${testmask}" for qw/PREROUTING OUTPUT/;
|
||||
}
|
||||
|
||||
my $chainref = new_chain 'mangle', 'routemark';
|
||||
|
Loading…
Reference in New Issue
Block a user