Factor out some '-' setting

git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@5681 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
teastep 2007-03-25 16:47:21 +00:00
parent cf4ad08b96
commit 47f2811b68
5 changed files with 2 additions and 16 deletions

View File

@ -485,7 +485,7 @@ sub process_action3( $$$$$ ) {
$mdest = '';
}
$mdest = '' if $mdest eq '-';
$mdest = '' if $mdest eq '-';
$mproto = merge_macro_column $mproto, $proto;
$mports = merge_macro_column $mports, $ports;

View File

@ -603,10 +603,6 @@ sub do_proto( $$$ )
my $output = '';
$proto = '' unless defined $proto;
$ports = '' unless defined $ports;
$sports = '' unless defined $sports;
$proto = '' if $proto eq '-';
$ports = '' if $ports eq '-';
$sports = '' if $sports eq '-';
@ -787,8 +783,6 @@ sub do_user( $ ) {
sub do_tos( $ ) {
my $tos = $_[0];
$tos = '-' unless $tos;
$tos ne '-' ? "-m tos --tos $tos " : '';
}

View File

@ -156,7 +156,7 @@ sub validate_interfaces_file()
( $interfaces{$interface}{root} = $interface ) =~ s/\+$// ;
if ( $networks && $networks ne '-' && $networks ne 'detect' )
if ( $networks && $networks ne 'detect' )
{
warning_message 'Shorewall no longer uses broadcast addresses in rule generation:' . $networks;
}

View File

@ -43,8 +43,6 @@ my @proxyarp;
sub setup_one_proxy_arp( $$$$$ ) {
my ( $address, $interface, $external, $haveroute, $persistent) = @_;
$haveroute = '-' unless $haveroute;
if ( "\L$haveroute" eq 'no' || $haveroute eq '-' ) {
$haveroute = '';
} elsif ( "\L$haveroute" eq 'yes' ) {
@ -53,8 +51,6 @@ sub setup_one_proxy_arp( $$$$$ ) {
fatal_error "Invalid value ($haveroute) for HAVEROUTE in Proxy Arp Entry \"$line\"";
}
$persistent = '-' unless $persistent;
if ( "\L$persistent" eq 'no' || $persistent eq '-' ) {
$persistent = '';
} elsif ( "\L$persistent" eq 'yes' ) {

View File

@ -252,8 +252,6 @@ sub process_criticalhosts() {
push @hosts, "$interface:$hosts";
}
$options = '-' unless $options;
unless ( $options eq '-' ) {
for my $option (split /,/, $options ) {
unless ( $option eq 'routeback' || $option eq 'source' || $option eq 'dest' ) {
@ -295,8 +293,6 @@ sub process_routestopped() {
push @hosts, "$interface:$hosts";
}
$options = '-' unless $options;
unless ( $options eq '-' ) {
for my $option (split /,/, $options ) {
if ( $option eq 'routeback' ) {