forked from extern/shorewall_code
Fix ECN when MANGLE_FORWARD is not available.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
8eff66dcfd
commit
7708c251db
@ -152,7 +152,10 @@ sub setup_ecn()
|
|||||||
|
|
||||||
if ( my $fn = open_file 'ecn' ) {
|
if ( my $fn = open_file 'ecn' ) {
|
||||||
|
|
||||||
first_entry "$doing $fn...";
|
first_entry( sub { progress_message2 "$doing $fn...";
|
||||||
|
require_capability 'MANGLE_ENABLED', 'Entries in the ecn file', '';
|
||||||
|
warning_message 'ECN will not be applied to forwarded packets' unless have_capability 'MANGLE_FORWARD';
|
||||||
|
} );
|
||||||
|
|
||||||
while ( read_a_line ) {
|
while ( read_a_line ) {
|
||||||
|
|
||||||
@ -178,7 +181,7 @@ sub setup_ecn()
|
|||||||
for my $interface ( @interfaces ) {
|
for my $interface ( @interfaces ) {
|
||||||
my $chainref = ensure_chain 'mangle', ecn_chain( $interface );
|
my $chainref = ensure_chain 'mangle', ecn_chain( $interface );
|
||||||
|
|
||||||
add_ijump $mangle_table->{POSTROUTING} , j => $chainref, p => 'tcp', imatch_dest_dev( $interface );
|
add_ijump $mangle_table->{POSTROUTING} , j => $chainref, p => 'tcp', imatch_dest_dev( $interface ) if have_capability 'MANGLE_FORWARD';
|
||||||
add_ijump $mangle_table->{OUTPUT}, j => $chainref, p => 'tcp', imatch_dest_dev( $interface );
|
add_ijump $mangle_table->{OUTPUT}, j => $chainref, p => 'tcp', imatch_dest_dev( $interface );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user