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:
teastep 2008-01-25 23:52:33 +00:00
parent 391ea14350
commit f960345b51

View File

@ -185,6 +185,8 @@ sub setup_one_masq($$$$$$$)
#
# Isolate and verify the interface part
#
fatal_error "Invalid Interface List ($interfacelist)" unless defined $fullinterface && $fullinterface ne '';
( my $interface = $fullinterface ) =~ s/:.*//;
if ( $interface =~ /(.*)[(](\w*)[)]$/ ) {
@ -442,6 +444,7 @@ sub setup_nat() {
$digit = defined $digit ? ":$digit" : '';
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;
}