mirror of
https://gitlab.com/shorewall/code.git
synced 2025-01-03 20:19:19 +01:00
Support address ranges and ipset names in the ADDRESSES column of the maclist file
git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@5306 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
parent
4a051c0dae
commit
40167b70c7
@ -192,12 +192,12 @@ setup_mac_lists() # $1 = Phase Number
|
|||||||
if [ -z "$addresses" ]; then
|
if [ -z "$addresses" ]; then
|
||||||
[ -n "$level" ] && \
|
[ -n "$level" ] && \
|
||||||
log_rule_limit $level $chain $(mac_chain $interface) $disposition "$LOGLIMIT" "" -A -t $MACLIST_TABLE $macpart $physdev_part
|
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
|
run_iptables -A $chain -t $MACLIST_TABLE $macpart $physdev_part -j $target
|
||||||
else
|
else
|
||||||
for address in $(separate_list $addresses) ; do
|
for address in $(separate_list $addresses) ; do
|
||||||
[ -n "$level" ] && \
|
[ -n "$level" ] && \
|
||||||
log_rule_limit $level $chain $(mac_chain $interface) $disposition "$LOGLIMIT" "" -A -t $MACLIST_TABLE $macpart -s $address $physdev_part
|
log_rule_limit $level $chain $(mac_chain $interface) $disposition "$LOGLIMIT" "" -A -t $MACLIST_TABLE $macpart $(match_source_hosts $address) $physdev_part
|
||||||
run_iptables2 -A $chain -t $MACLIST_TABLE $macpart -s $address $physdev_part -j $target
|
run_iptables2 -A $chain -t $MACLIST_TABLE $macpart $(match_source_hosts $address) $physdev_part -j $target
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
done < $TMP_DIR/maclist
|
done < $TMP_DIR/maclist
|
||||||
|
Loading…
Reference in New Issue
Block a user