diff --git a/New/Shorewall/Actions.pm b/New/Shorewall/Actions.pm index c6d9567b1..e0a936d3d 100644 --- a/New/Shorewall/Actions.pm +++ b/New/Shorewall/Actions.pm @@ -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; diff --git a/New/Shorewall/Chains.pm b/New/Shorewall/Chains.pm index f18fc71a9..a53b754d8 100644 --- a/New/Shorewall/Chains.pm +++ b/New/Shorewall/Chains.pm @@ -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 " : ''; } diff --git a/New/Shorewall/Interfaces.pm b/New/Shorewall/Interfaces.pm index 3a178585a..56201326f 100644 --- a/New/Shorewall/Interfaces.pm +++ b/New/Shorewall/Interfaces.pm @@ -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; } diff --git a/New/Shorewall/Proxyarp.pm b/New/Shorewall/Proxyarp.pm index b731df97e..8e91649ea 100644 --- a/New/Shorewall/Proxyarp.pm +++ b/New/Shorewall/Proxyarp.pm @@ -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' ) { diff --git a/New/Shorewall/Rules.pm b/New/Shorewall/Rules.pm index 7dd30f1d2..d97f54ef8 100644 --- a/New/Shorewall/Rules.pm +++ b/New/Shorewall/Rules.pm @@ -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' ) {