diff --git a/Shorewall/firewall b/Shorewall/firewall index bdb987f29..d7c029ea8 100755 --- a/Shorewall/firewall +++ b/Shorewall/firewall @@ -168,12 +168,17 @@ fix_bang() { run_iptables() { if [ "x${*%!*}" = "x$*" ]; then + # + # No "!" in the command -- just execute it + # if ! iptables $@ ; then [ -z "$stopping" ] && { stop_firewall; exit 2; } fi return fi - + # + # Need to insert white space before each "!" + # if ! iptables `fix_bang $@`; then [ -z "$stopping" ] && { stop_firewall; exit 2; } fi @@ -401,16 +406,6 @@ input_chain() # $1 = interface echo `chain_base $1`_in } -# -# Input Chains (input and forward) for an interface -# -input_chains() # $1 = interface -{ - local base=`chain_base $1` - - echo ${base}_in ${base}_fwd -} - # # Output Chain for an interface # @@ -1591,7 +1586,7 @@ setup_mac_lists() { for hosts in $maclist_hosts; do interface=${hosts%:*} hosts=${hosts#*:} - for chain in `input_chains $interface` ; do + for chain in `first_chains $interface` ; do run_iptables -A $chain -s $hosts -m state --state NEW \ -j `mac_chain $interface` done