Tighten up editing -- some more

git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@6384 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
teastep 2007-05-17 14:17:29 +00:00
parent 7346304b57
commit afd462c6b2
2 changed files with 8 additions and 3 deletions

View File

@ -228,7 +228,8 @@ sub setup_one_masq($$$$$$$)
}
if ( $add_snat_aliases ) {
my ( $interface, $alias ) = split /:/, $fullinterface;
my ( $interface, $alias , $remainder ) = split( /:/, $fullinterface, 3 );
fatal_error "Invalid alias ($alias:$remainder)" if defined $remainder;
for my $address ( split /,/, $addresses ) {
my ( $addrs, $port ) = split /:/, $address;
next unless $addrs;
@ -309,7 +310,9 @@ sub do_one_nat( $$$$$ )
{
my ( $external, $fullinterface, $internal, $allints, $localnat ) = @_;
my ( $interface, $alias ) = split /:/, $fullinterface;
my ( $interface, $alias, $remainder ) = split( /:/, $fullinterface, 3 );
fatal_error "Invalid alias ($alias:$remainder)" if defined $remainder;
sub add_nat_rule( $$ ) {
add_rule ensure_chain( 'nat', $_[0] ) , $_[1];

View File

@ -153,7 +153,9 @@ sub validate_policy()
fatal_error "Undefined zone $server" unless $serverwild || $zones{$server};
( $policy , my $default ) = split /:/, $policy;
( $policy , my ( $default, $remainder ) ) = split( /:/, $policy, 3 );
fatal_error "Invalid default action ($default:$remainder)" if defined $remainder;
if ( $default ) {
if ( "\L$default" eq 'none' ) {