From 14a20ece71a49e71b464a5813950942f07bc8f0d Mon Sep 17 00:00:00 2001 From: teastep Date: Wed, 4 Dec 2002 23:53:03 +0000 Subject: [PATCH] a) Rewrote 'list_count' to not require 'wc' b) Turn off trace after error c) Allow output ICMP unconditionally again git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@350 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb --- Shorewall/firewall | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/Shorewall/firewall b/Shorewall/firewall index 813da1ec5..c8e4e2d29 100755 --- a/Shorewall/firewall +++ b/Shorewall/firewall @@ -61,9 +61,11 @@ list_search() # $1 = element to search for , $2-$n = list # Function to count list elements # list_count() { - local temp="`separate_list $1`" - - echo $temp | wc -w + arg_count() { + echo $# + } + + arg_count `separate_list $1` } # @@ -1103,6 +1105,17 @@ run_user_exit() # $1 = file name # Stop the Firewall # stop_firewall() { + # + # Turn off trace unless we were tracing "stop" or "clear" + # + case $command in + stop|clear) + ;; + *) + set +x + ;; + esac + stopping="Yes" deletechain shorewall @@ -3386,7 +3399,7 @@ add_common_rules() { # # Enable icmp output # - run_iptables -A OUTPUT -m state --state ! INVALID -p icmp -j ACCEPT + run_iptables -A OUTPUT -p icmp -j ACCEPT # # Route Filtering #