forked from extern/shorewall_code
Reduce the number of exported symbols from the Providers module
git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@5609 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
parent
a6f3ed93be
commit
ae4718fb2f
@ -31,7 +31,7 @@ use Shorewall::Chains;
|
|||||||
use strict;
|
use strict;
|
||||||
|
|
||||||
our @ISA = qw(Exporter);
|
our @ISA = qw(Exporter);
|
||||||
our @EXPORT = qw( setup_providers %routemarked_interfaces $routemarked_interfaces);
|
our @EXPORT = qw( setup_providers @routemarked_interfaces);
|
||||||
our @EXPORT_OK = ( );
|
our @EXPORT_OK = ( );
|
||||||
our @VERSION = 1.00;
|
our @VERSION = 1.00;
|
||||||
|
|
||||||
@ -42,7 +42,7 @@ use constant { LOCAL_NUMBER => 255,
|
|||||||
};
|
};
|
||||||
|
|
||||||
our %routemarked_interfaces;
|
our %routemarked_interfaces;
|
||||||
our $routemarked_interfaces = 0;
|
our @routemarked_interfaces;
|
||||||
|
|
||||||
my $balance = 0;
|
my $balance = 0;
|
||||||
my $first_default_route = 1;
|
my $first_default_route = 1;
|
||||||
@ -241,7 +241,7 @@ sub setup_providers() {
|
|||||||
fatal_error "Interface $interface is tracked through an earlier provider" if $routemarked_interfaces{$interface};
|
fatal_error "Interface $interface is tracked through an earlier provider" if $routemarked_interfaces{$interface};
|
||||||
fatal_error "The 'track' option requires a numeric value in the MARK column - Provider \"$line\"" if $mark eq '-';
|
fatal_error "The 'track' option requires a numeric value in the MARK column - Provider \"$line\"" if $mark eq '-';
|
||||||
$routemarked_interfaces{$interface} = $mark;
|
$routemarked_interfaces{$interface} = $mark;
|
||||||
$routemarked_interfaces++;
|
push @routemarked_interfaces, $interface;
|
||||||
} elsif ( $option =~ /^balance=(\d+)/ ) {
|
} elsif ( $option =~ /^balance=(\d+)/ ) {
|
||||||
balance_default_route $1 , $gateway, $interface;
|
balance_default_route $1 , $gateway, $interface;
|
||||||
} elsif ( $option eq 'balance' ) {
|
} elsif ( $option eq 'balance' ) {
|
||||||
@ -437,7 +437,7 @@ sub setup_providers() {
|
|||||||
pop_indent;
|
pop_indent;
|
||||||
emit "fi\n";
|
emit "fi\n";
|
||||||
|
|
||||||
setup_route_marking if $routemarked_interfaces;
|
setup_route_marking if @routemarked_interfaces;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -530,10 +530,10 @@ sub setup_tc() {
|
|||||||
|
|
||||||
my $mark_part = '';
|
my $mark_part = '';
|
||||||
|
|
||||||
if ( $routemarked_interfaces && ! $config{TC_EXPERT} ) {
|
if ( @routemarked_interfaces && ! $config{TC_EXPERT} ) {
|
||||||
$mark_part = '-m mark --mark 0/0xFF00';
|
$mark_part = '-m mark --mark 0/0xFF00';
|
||||||
|
|
||||||
for my $interface ( keys %routemarked_interfaces ) {
|
for my $interface ( @routemarked_interfaces ) {
|
||||||
add_rule $mangle_table->{PREROUTING} , "-i $interface -j tcpre";
|
add_rule $mangle_table->{PREROUTING} , "-i $interface -j tcpre";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user