mirror of
https://gitlab.com/shorewall/code.git
synced 2024-11-24 00:23:28 +01:00
Remove redundent function - add some comments
git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@358 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
parent
1fa9316550
commit
39da3ef60f
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user