forked from extern/shorewall_code
Don't allow non-shared provider in masq file
git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@8182 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
parent
00a72b0dec
commit
5c922eb2af
@ -189,9 +189,11 @@ sub setup_one_masq($$$$$$$)
|
||||
|
||||
if ( $interface =~ /(.*)[(](\w*)[)]$/ ) {
|
||||
$interface = $1;
|
||||
my $realm = $2;
|
||||
my $provider = $2;
|
||||
$fullinterface =~ s/[(]\w*[)]//;
|
||||
$realm = lookup_provider( $realm ) unless $realm =~ /^\d+$/;
|
||||
my $realm = lookup_provider( $provider ) unless $provider =~ /^\d+$/;
|
||||
|
||||
fatal_error "$provider is not a shared-interface provider" unless $realm;
|
||||
|
||||
$rule .= "-m realm --realm $realm ";
|
||||
}
|
||||
|
@ -587,7 +587,7 @@ sub lookup_provider( $ ) {
|
||||
|
||||
fatal_error "Unknown provider ($provider)" unless $providerref;
|
||||
|
||||
$providerref->{number};
|
||||
$providerref->{shared} ? $providerref->{number} : 0;
|
||||
}
|
||||
|
||||
1;
|
||||
|
Loading…
Reference in New Issue
Block a user