mirror of
https://gitlab.com/shorewall/code.git
synced 2024-11-28 02:23:20 +01:00
Catch invalid lists in nat/masq entries
git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@8107 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
parent
391ea14350
commit
f960345b51
@ -185,6 +185,8 @@ sub setup_one_masq($$$$$$$)
|
|||||||
#
|
#
|
||||||
# Isolate and verify the interface part
|
# Isolate and verify the interface part
|
||||||
#
|
#
|
||||||
|
fatal_error "Invalid Interface List ($interfacelist)" unless defined $fullinterface && $fullinterface ne '';
|
||||||
|
|
||||||
( my $interface = $fullinterface ) =~ s/:.*//;
|
( my $interface = $fullinterface ) =~ s/:.*//;
|
||||||
|
|
||||||
if ( $interface =~ /(.*)[(](\w*)[)]$/ ) {
|
if ( $interface =~ /(.*)[(](\w*)[)]$/ ) {
|
||||||
@ -442,6 +444,7 @@ sub setup_nat() {
|
|||||||
$digit = defined $digit ? ":$digit" : '';
|
$digit = defined $digit ? ":$digit" : '';
|
||||||
|
|
||||||
for my $interface ( split /,/, $interfacelist ) {
|
for my $interface ( split /,/, $interfacelist ) {
|
||||||
|
fatal_error "Invalid Interface List ($interfacelist)" unless defined $interface && $interface ne '';
|
||||||
do_one_nat $external, "${interface}${digit}", $internal, $allints, $localnat;
|
do_one_nat $external, "${interface}${digit}", $internal, $allints, $localnat;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user