mirror of
https://gitlab.com/shorewall/code.git
synced 2024-11-15 04:04:10 +01:00
Improve check for shared-interface provider
git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@8183 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
parent
5c922eb2af
commit
7067a3d53d
@ -585,7 +585,21 @@ sub lookup_provider( $ ) {
|
||||
my $provider = $_[0];
|
||||
my $providerref = $providers{ $provider };
|
||||
|
||||
unless ( $providerref ) {
|
||||
fatal_error "Unknown provider ($provider)" unless $provider =~ /^(0x[a-f0-9]+|0[0-7]*|[0-9]*)$/;
|
||||
|
||||
my $provider_number = numeric_value $provider;
|
||||
|
||||
for ( keys %providers ) {
|
||||
if ( $providers{$_}{number} == $provider_number ) {
|
||||
$providerref = $providers{$_};
|
||||
last;
|
||||
}
|
||||
}
|
||||
|
||||
fatal_error "Unknown provider ($provider)" unless $providerref;
|
||||
}
|
||||
|
||||
|
||||
$providerref->{shared} ? $providerref->{number} : 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user