forked from extern/shorewall_code
Much ado about nothing (extraneous whitespace removal)
git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@5707 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
parent
a8231a26b8
commit
85ad25cb68
@ -324,7 +324,6 @@ sub process_actions1() {
|
||||
}
|
||||
|
||||
progress_message " ..End Macro";
|
||||
|
||||
close M;
|
||||
} else {
|
||||
fatal_error "Invalid TARGET ($target) in rule \"$line\"";
|
||||
|
@ -112,6 +112,7 @@ sub add_group_to_zone($$$$$)
|
||||
#
|
||||
# Parse the interfaces file.
|
||||
#
|
||||
|
||||
sub validate_interfaces_file()
|
||||
{
|
||||
my %validoptions = (arp_filter => 1,
|
||||
|
@ -392,8 +392,10 @@ sub setup_providers() {
|
||||
'fi',
|
||||
'' );
|
||||
} else {
|
||||
emit "#\n# We don't have any 'balance' providers so we restore any default route that we've saved\n#";
|
||||
emit 'restore_default_route';
|
||||
emitj( '#',
|
||||
'# We don\'t have any \'balance\' providers so we restore any default route that we\'ve saved',
|
||||
'#',
|
||||
'restore_default_route' );
|
||||
}
|
||||
|
||||
emit 'cat > /etc/iproute2/rt_tables <<EOF';
|
||||
|
@ -796,7 +796,7 @@ sub process_rule1 ( $$$$$$$$$ ) {
|
||||
if ( $actiontype == MACRO ) {
|
||||
process_macro
|
||||
$macros{$basictarget},
|
||||
target ,
|
||||
$target ,
|
||||
$param ,
|
||||
$source,
|
||||
$dest,
|
||||
@ -1220,6 +1220,7 @@ sub generate_matrix() {
|
||||
add_rule $chainref , join( '', "-i $interface ", match_source_net( $host ), '-j RETURN' );
|
||||
}
|
||||
}
|
||||
|
||||
#
|
||||
# Generate_Matrix() Starts Here
|
||||
#
|
||||
|
@ -265,7 +265,6 @@ sub rate_to_kbit( $ ) {
|
||||
|
||||
sub calculate_quantum( $ ) {
|
||||
my $rate = rate_to_kbit $_[0];
|
||||
|
||||
eval "int( ( $rate * 128 ) / $r2q )";
|
||||
}
|
||||
|
||||
@ -364,7 +363,6 @@ sub setup_traffic_shaping() {
|
||||
fatal_error "Invalid tcdevices entry: \"$line\"" if $outband eq '-';
|
||||
validate_tc_device( $device, $inband, $outband );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
close TD;
|
||||
@ -381,7 +379,6 @@ sub setup_traffic_shaping() {
|
||||
|
||||
validate_tc_class( $device, $mark, $rate, $ceil, $prio, $options );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
close TC;
|
||||
|
@ -58,11 +58,7 @@ use Shorewall::Accounting;
|
||||
use Shorewall::Rules;
|
||||
use Shorewall::Proc;
|
||||
use Shorewall::Proxyarp;
|
||||
#
|
||||
# Emacs doesn't handle 'here documents' in Perl Mode nearly as well as it does in Shell mode
|
||||
# (it basically doesn't understand it at all and gets lost). So I use a number of rather
|
||||
# awkward styles in place of 'here docs'.
|
||||
#
|
||||
|
||||
sub generate_script_1 {
|
||||
copy $env{SHAREDIRPL} . 'prog.header';
|
||||
|
||||
@ -77,7 +73,6 @@ sub generate_script_1 {
|
||||
'PRODUCT="Shorewall Lite"' );
|
||||
|
||||
copy "$env{SHAREDIR}/lib.base";
|
||||
|
||||
emitj ( '################################################################################',
|
||||
'# End of /usr/share/shorewall/lib.base',
|
||||
'################################################################################' );
|
||||
@ -164,7 +159,7 @@ sub generate_script_1 {
|
||||
|
||||
sub compile_stop_firewall() {
|
||||
|
||||
emit "
|
||||
emit <<EOF;
|
||||
#
|
||||
# Stop/restore the firewall after an error or because of a 'stop' or 'clear' command
|
||||
#
|
||||
@ -302,7 +297,9 @@ stop_firewall() {
|
||||
done
|
||||
fi
|
||||
|
||||
rm -f \${VARDIR}/proxyarp\n";
|
||||
rm -f \${VARDIR}/proxyarp
|
||||
|
||||
EOF
|
||||
|
||||
emit ' delete_tc1' if $config{CLEAR_TC};
|
||||
emit ' undo_routing';
|
||||
@ -314,8 +311,10 @@ stop_firewall() {
|
||||
if ( $config{ADMINISABSENTMINDED} ) {
|
||||
emitj ( ' for chain in INPUT OUTPUT; do',
|
||||
' setpolicy $chain ACCEPT',
|
||||
" done\n",
|
||||
" setpolicy FORWARD DROP\n",
|
||||
' done',
|
||||
'',
|
||||
' setpolicy FORWARD DROP',
|
||||
'',
|
||||
' deleteallchains',
|
||||
'' );
|
||||
|
||||
@ -417,7 +416,7 @@ stop_firewall() {
|
||||
|
||||
pop_indent;
|
||||
|
||||
emit "
|
||||
emit <<EOF;
|
||||
set_state \"Stopped\"
|
||||
|
||||
logger -p kern.info \"\$PRODUCT Stopped\"
|
||||
@ -434,7 +433,9 @@ stop_firewall() {
|
||||
kill \$\$
|
||||
;;
|
||||
esac
|
||||
}\n";
|
||||
}
|
||||
|
||||
EOF
|
||||
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user