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:
teastep 2007-03-21 17:16:47 +00:00
parent a6f3ed93be
commit ae4718fb2f
2 changed files with 6 additions and 6 deletions

View File

@ -31,7 +31,7 @@ use Shorewall::Chains;
use strict;
our @ISA = qw(Exporter);
our @EXPORT = qw( setup_providers %routemarked_interfaces $routemarked_interfaces);
our @EXPORT = qw( setup_providers @routemarked_interfaces);
our @EXPORT_OK = ( );
our @VERSION = 1.00;
@ -42,7 +42,7 @@ use constant { LOCAL_NUMBER => 255,
};
our %routemarked_interfaces;
our $routemarked_interfaces = 0;
our @routemarked_interfaces;
my $balance = 0;
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 "The 'track' option requires a numeric value in the MARK column - Provider \"$line\"" if $mark eq '-';
$routemarked_interfaces{$interface} = $mark;
$routemarked_interfaces++;
push @routemarked_interfaces, $interface;
} elsif ( $option =~ /^balance=(\d+)/ ) {
balance_default_route $1 , $gateway, $interface;
} elsif ( $option eq 'balance' ) {
@ -437,7 +437,7 @@ sub setup_providers() {
pop_indent;
emit "fi\n";
setup_route_marking if $routemarked_interfaces;
setup_route_marking if @routemarked_interfaces;
}

View File

@ -530,10 +530,10 @@ sub setup_tc() {
my $mark_part = '';
if ( $routemarked_interfaces && ! $config{TC_EXPERT} ) {
if ( @routemarked_interfaces && ! $config{TC_EXPERT} ) {
$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";
}
}