Remove 'stat' provider option

Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
Tom Eastep 2012-01-12 07:09:53 -08:00
parent aff1e4ef0a
commit 057ea718cd

View File

@ -53,7 +53,6 @@ my @routemarked_providers;
my %routemarked_interfaces; my %routemarked_interfaces;
our @routemarked_interfaces; our @routemarked_interfaces;
my %provider_interfaces; my %provider_interfaces;
my @stat_providers;
my $balancing; my $balancing;
my $fallback; my $fallback;
@ -87,7 +86,6 @@ sub initialize( $ ) {
%routemarked_interfaces = (); %routemarked_interfaces = ();
@routemarked_interfaces = (); @routemarked_interfaces = ();
%provider_interfaces = (); %provider_interfaces = ();
@stat_providers = ();
$balancing = 0; $balancing = 0;
$fallback = 0; $fallback = 0;
$first_default_route = 1; $first_default_route = 1;
@ -368,8 +366,8 @@ sub process_a_provider() {
$gateway = ''; $gateway = '';
} }
my ( $loose, $track, $balance , $default, $default_balance, $optional, $mtu, $local , $stat ) = my ( $loose, $track, $balance , $default, $default_balance, $optional, $mtu, $local ) =
(0, $config{TRACK_PROVIDERS}, 0 , 0, $config{USE_DEFAULT_RT} ? 1 : 0, interface_is_optional( $interface ), '' , 0 , 0); (0, $config{TRACK_PROVIDERS}, 0 , 0, $config{USE_DEFAULT_RT} ? 1 : 0, interface_is_optional( $interface ), '' , 0 );
unless ( $options eq '-' ) { unless ( $options eq '-' ) {
for my $option ( split_list $options, 'option' ) { for my $option ( split_list $options, 'option' ) {
@ -410,8 +408,6 @@ sub process_a_provider() {
$local = 1; $local = 1;
$track = 0 if $config{TRACK_PROVIDERS}; $track = 0 if $config{TRACK_PROVIDERS};
$default_balance = 0 if $config{USE_DEFAULT_RT}; $default_balance = 0 if $config{USE_DEFAULT_RT};
} elsif ( $option eq 'stat' ) {
$stat = 1;
} else { } else {
fatal_error "Invalid option ($option)"; fatal_error "Invalid option ($option)";
} }
@ -492,7 +488,6 @@ sub process_a_provider() {
duplicate => $duplicate , duplicate => $duplicate ,
address => $address , address => $address ,
local => $local , local => $local ,
stat => $stat ,
rules => [] , rules => [] ,
routes => [] , routes => [] ,
}; };
@ -511,12 +506,6 @@ sub process_a_provider() {
push @routemarked_providers, $providers{$table}; push @routemarked_providers, $providers{$table};
} }
if ( $stat ) {
require_capability 'STATISTIC_MATCH', q(The 'stat' option), 's';
fatal_error q('stat' requires either 'balance' or 'fallback=<weight>') unless $balance || $default > 0;
push @stat_providers, $providers{$table};
}
push @providers, $table; push @providers, $table;
progress_message " Provider \"$currentline\" $done"; progress_message " Provider \"$currentline\" $done";