forked from extern/shorewall_code
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:
parent
cf4ad08b96
commit
47f2811b68
@ -485,7 +485,7 @@ sub process_action3( $$$$$ ) {
|
|||||||
$mdest = '';
|
$mdest = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
$mdest = '' if $mdest eq '-';
|
$mdest = '' if $mdest eq '-';
|
||||||
|
|
||||||
$mproto = merge_macro_column $mproto, $proto;
|
$mproto = merge_macro_column $mproto, $proto;
|
||||||
$mports = merge_macro_column $mports, $ports;
|
$mports = merge_macro_column $mports, $ports;
|
||||||
|
@ -603,10 +603,6 @@ sub do_proto( $$$ )
|
|||||||
|
|
||||||
my $output = '';
|
my $output = '';
|
||||||
|
|
||||||
$proto = '' unless defined $proto;
|
|
||||||
$ports = '' unless defined $ports;
|
|
||||||
$sports = '' unless defined $sports;
|
|
||||||
|
|
||||||
$proto = '' if $proto eq '-';
|
$proto = '' if $proto eq '-';
|
||||||
$ports = '' if $ports eq '-';
|
$ports = '' if $ports eq '-';
|
||||||
$sports = '' if $sports eq '-';
|
$sports = '' if $sports eq '-';
|
||||||
@ -787,8 +783,6 @@ sub do_user( $ ) {
|
|||||||
sub do_tos( $ ) {
|
sub do_tos( $ ) {
|
||||||
my $tos = $_[0];
|
my $tos = $_[0];
|
||||||
|
|
||||||
$tos = '-' unless $tos;
|
|
||||||
|
|
||||||
$tos ne '-' ? "-m tos --tos $tos " : '';
|
$tos ne '-' ? "-m tos --tos $tos " : '';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -156,7 +156,7 @@ sub validate_interfaces_file()
|
|||||||
|
|
||||||
( $interfaces{$interface}{root} = $interface ) =~ s/\+$// ;
|
( $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;
|
warning_message 'Shorewall no longer uses broadcast addresses in rule generation:' . $networks;
|
||||||
}
|
}
|
||||||
|
@ -43,8 +43,6 @@ my @proxyarp;
|
|||||||
sub setup_one_proxy_arp( $$$$$ ) {
|
sub setup_one_proxy_arp( $$$$$ ) {
|
||||||
my ( $address, $interface, $external, $haveroute, $persistent) = @_;
|
my ( $address, $interface, $external, $haveroute, $persistent) = @_;
|
||||||
|
|
||||||
$haveroute = '-' unless $haveroute;
|
|
||||||
|
|
||||||
if ( "\L$haveroute" eq 'no' || $haveroute eq '-' ) {
|
if ( "\L$haveroute" eq 'no' || $haveroute eq '-' ) {
|
||||||
$haveroute = '';
|
$haveroute = '';
|
||||||
} elsif ( "\L$haveroute" eq 'yes' ) {
|
} 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\"";
|
fatal_error "Invalid value ($haveroute) for HAVEROUTE in Proxy Arp Entry \"$line\"";
|
||||||
}
|
}
|
||||||
|
|
||||||
$persistent = '-' unless $persistent;
|
|
||||||
|
|
||||||
if ( "\L$persistent" eq 'no' || $persistent eq '-' ) {
|
if ( "\L$persistent" eq 'no' || $persistent eq '-' ) {
|
||||||
$persistent = '';
|
$persistent = '';
|
||||||
} elsif ( "\L$persistent" eq 'yes' ) {
|
} elsif ( "\L$persistent" eq 'yes' ) {
|
||||||
|
@ -252,8 +252,6 @@ sub process_criticalhosts() {
|
|||||||
push @hosts, "$interface:$hosts";
|
push @hosts, "$interface:$hosts";
|
||||||
}
|
}
|
||||||
|
|
||||||
$options = '-' unless $options;
|
|
||||||
|
|
||||||
unless ( $options eq '-' ) {
|
unless ( $options eq '-' ) {
|
||||||
for my $option (split /,/, $options ) {
|
for my $option (split /,/, $options ) {
|
||||||
unless ( $option eq 'routeback' || $option eq 'source' || $option eq 'dest' ) {
|
unless ( $option eq 'routeback' || $option eq 'source' || $option eq 'dest' ) {
|
||||||
@ -295,8 +293,6 @@ sub process_routestopped() {
|
|||||||
push @hosts, "$interface:$hosts";
|
push @hosts, "$interface:$hosts";
|
||||||
}
|
}
|
||||||
|
|
||||||
$options = '-' unless $options;
|
|
||||||
|
|
||||||
unless ( $options eq '-' ) {
|
unless ( $options eq '-' ) {
|
||||||
for my $option (split /,/, $options ) {
|
for my $option (split /,/, $options ) {
|
||||||
if ( $option eq 'routeback' ) {
|
if ( $option eq 'routeback' ) {
|
||||||
|
Loading…
Reference in New Issue
Block a user