mirror of
https://gitlab.com/shorewall/code.git
synced 2025-02-02 02:49:54 +01:00
Fix another indentation problem
git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@5225 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
parent
2605b6c1c0
commit
d5b66d5820
@ -165,31 +165,31 @@ setup_mac_lists() # $1 = Phase Number
|
|||||||
|
|
||||||
[ -n "$MACLIST_TTL" ] && chain=$(macrecent_target $interface) || chain=$(mac_chain $interface)
|
[ -n "$MACLIST_TTL" ] && chain=$(macrecent_target $interface) || chain=$(mac_chain $interface)
|
||||||
|
|
||||||
if ! have_mac_chain $chain ; then
|
if ! have_mac_chain $chain ; then
|
||||||
fatal_error "No hosts on $interface have the maclist option specified"
|
fatal_error "No hosts on $interface have the maclist option specified"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ x${mac:=-} = x- ]; then
|
|
||||||
if [ -z "$addresses" ]; then
|
|
||||||
fatal_error "You must specify a MAC address or an IP address"
|
|
||||||
else
|
|
||||||
macpart=
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
macpart=$(mac_match $mac)
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
if [ x${mac:=-} = x- ]; then
|
||||||
if [ -z "$addresses" ]; then
|
if [ -z "$addresses" ]; then
|
||||||
[ -n "$level" ] && \
|
fatal_error "You must specify a MAC address or an IP address"
|
||||||
log_rule_limit $level $chain $(mac_chain $interface) $disposition "$LOGLIMIT" "" -A -t $MACLIST_TABLE $macpart $physdev_part
|
|
||||||
run_iptables -A $chain -t $MACLIST_TABLE $macpart $physdev_part -j $target
|
|
||||||
else
|
else
|
||||||
for address in $(separate_list $addresses) ; do
|
macpart=
|
||||||
[ -n "$level" ] && \
|
|
||||||
log_rule_limit $level $chain $(mac_chain $interface) $disposition "$LOGLIMIT" "" -A -t $MACLIST_TABLE $macpart -s $address $physdev_part
|
|
||||||
run_iptables2 -A $chain -t $MACLIST_TABLE $macpart -s $address $physdev_part -j $target
|
|
||||||
done
|
|
||||||
fi
|
fi
|
||||||
|
else
|
||||||
|
macpart=$(mac_match $mac)
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z "$addresses" ]; then
|
||||||
|
[ -n "$level" ] && \
|
||||||
|
log_rule_limit $level $chain $(mac_chain $interface) $disposition "$LOGLIMIT" "" -A -t $MACLIST_TABLE $macpart $physdev_part
|
||||||
|
run_iptables -A $chain -t $MACLIST_TABLE $macpart $physdev_part -j $target
|
||||||
|
else
|
||||||
|
for address in $(separate_list $addresses) ; do
|
||||||
|
[ -n "$level" ] && \
|
||||||
|
log_rule_limit $level $chain $(mac_chain $interface) $disposition "$LOGLIMIT" "" -A -t $MACLIST_TABLE $macpart -s $address $physdev_part
|
||||||
|
run_iptables2 -A $chain -t $MACLIST_TABLE $macpart -s $address $physdev_part -j $target
|
||||||
|
done
|
||||||
|
fi
|
||||||
done < $TMP_DIR/maclist
|
done < $TMP_DIR/maclist
|
||||||
#
|
#
|
||||||
# Generate jumps from the input and forward chains
|
# Generate jumps from the input and forward chains
|
||||||
|
Loading…
Reference in New Issue
Block a user