mirror of
https://gitlab.com/shorewall/code.git
synced 2024-11-09 01:04:06 +01:00
A little code cleanup
git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@1285 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
parent
c446fb3735
commit
6e51b83380
@ -1790,7 +1790,7 @@ setup_nat() {
|
||||
addnatrule nat_in -d $external -j DNAT --to-destination $internal
|
||||
addnatrule nat_out -s $internal -j SNAT --to-source $external
|
||||
|
||||
elif [ "x$allints" = "x" -o "x$allints" = "x-" -o "x$allints" = "xNo" -o "x$allints" = "xno" ]; then
|
||||
elif [ -z "$allints" -o "x$allints" = "x-" -o "x$allints" = "xNo" -o "x$allints" = "xno" ]; then
|
||||
addnatrule $(input_chain $iface) \
|
||||
-d $external -j DNAT --to-destination $internal
|
||||
addnatrule $(output_chain $iface) \
|
||||
@ -1801,7 +1801,7 @@ setup_nat() {
|
||||
|
||||
if [ "x$localnat" = "xYes" -o "x$localnat" = "xyes" ]; then
|
||||
run_iptables2 -t nat -A OUTPUT -d $external -j DNAT --to-destination $internal
|
||||
elif [ "x$localnat" != "x-" -a "x$localnat" != "x" -a "x$localnat" != "xNo" -a "x$localnat" != "xno" ]; then
|
||||
elif [ "x$localnat" != "x-" -a -n "$localnat" -a "x$localnat" != "xNo" -a "x$localnat" != "xno" ]; then
|
||||
fatal_error "Invalid value ($allints) for LOCAL in entry \"$external $interface $internal $allints $localnat\""
|
||||
fi
|
||||
|
||||
@ -5280,9 +5280,9 @@ define_firewall() # $1 = Command (Start or Restart)
|
||||
[ -n "$maclist_hosts" ] && setup_mac_lists
|
||||
|
||||
echo "Pre-processing Actions..."; process_actions1
|
||||
echo "Processing $rules..."; process_rules
|
||||
echo "Processing $(find_file rules)..."; process_rules
|
||||
echo "Processing Actions..."; process_actions2
|
||||
echo "Processing $policy..."; apply_policy_rules
|
||||
echo "Processing $(find_file policy)..."; apply_policy_rules
|
||||
|
||||
masq=$(find_file masq)
|
||||
[ -f $masq ] && setup_masq $masq
|
||||
|
@ -597,9 +597,9 @@ while [ $done -eq 0 ]; do
|
||||
-*)
|
||||
option=${option#-}
|
||||
|
||||
[ "x$option" = x ] && usage 1
|
||||
[ -z "$option" ] && usage 1
|
||||
|
||||
while [ "x$option" != x ]; do
|
||||
while [ -n "$option" ]; do
|
||||
case $option in
|
||||
c)
|
||||
[ $# -eq 1 ] && usage 1
|
||||
|
Loading…
Reference in New Issue
Block a user