parent
04857d52cf
commit
1e6b4787fe
@ -1121,6 +1121,7 @@ acl_app() {
|
||||
|
||||
[ "$enabled" = "1" ] || continue
|
||||
|
||||
if [ -n "${sources}" ]; then
|
||||
for s in $sources; do
|
||||
local s2
|
||||
is_iprange=$(lua_api "iprange(\"${s}\")")
|
||||
@ -1139,9 +1140,13 @@ acl_app() {
|
||||
[ -n "${s2}" ] && source_list="${source_list}\n${s2}"
|
||||
unset s2
|
||||
done
|
||||
else
|
||||
source_list="any"
|
||||
fi
|
||||
|
||||
mkdir -p $TMP_ACL_PATH/$sid
|
||||
[ ! -z "${source_list}" ] && echo -e "${source_list}" | sed '/^$/d' > $TMP_ACL_PATH/$sid/source_list
|
||||
local acl_path=${TMP_ACL_PATH}/$sid
|
||||
mkdir -p ${acl_path}
|
||||
[ -n "${source_list}" ] && echo -e "${source_list}" | sed '/^$/d' > ${acl_path}/source_list
|
||||
|
||||
node=${node:-default}
|
||||
tcp_no_redir_ports=${tcp_no_redir_ports:-default}
|
||||
|
@ -329,6 +329,8 @@ load_acl() {
|
||||
[ -z "${device}" ] && device="${interface}"
|
||||
_ipt_source="-i ${device} "
|
||||
msg="源接口【${device}】,"
|
||||
else
|
||||
msg="源接口【所有】,"
|
||||
fi
|
||||
if [ -n "$(echo ${i} | grep '^iprange:')" ]; then
|
||||
_iprange=$(echo ${i} | sed 's#iprange:##g')
|
||||
@ -357,6 +359,8 @@ load_acl() {
|
||||
_ipt_source=$(factor ${_mac} "${_ipt_source}-m mac --mac-source")
|
||||
msg="${msg}MAC【${_mac}】,"
|
||||
unset _mac
|
||||
elif [ -n "$(echo ${i} | grep '^any')" ]; then
|
||||
msg="${msg}所有设备,"
|
||||
else
|
||||
continue
|
||||
fi
|
||||
|
@ -384,6 +384,8 @@ load_acl() {
|
||||
[ -z "${device}" ] && device="${interface}"
|
||||
_ipt_source="iifname ${device} "
|
||||
msg="源接口【${device}】,"
|
||||
else
|
||||
msg="源接口【所有】,"
|
||||
fi
|
||||
if [ -n "$(echo ${i} | grep '^iprange:')" ]; then
|
||||
_iprange=$(echo ${i} | sed 's#iprange:##g')
|
||||
@ -405,6 +407,8 @@ load_acl() {
|
||||
_ipt_source=$(factor ${_mac} "${_ipt_source}ether saddr")
|
||||
msg="${msg}MAC【${_mac}】,"
|
||||
unset _mac
|
||||
elif [ -n "$(echo ${i} | grep '^any')" ]; then
|
||||
msg="${msg}所有设备,"
|
||||
else
|
||||
continue
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user