mirror of
https://gitlab.com/shorewall/code.git
synced 2025-01-12 08:38:14 +01:00
More ipset tweaks
git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@2100 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
parent
6d13070722
commit
979f4c9a22
@ -559,7 +559,7 @@ iprange_echo()
|
||||
#
|
||||
get_set_flags() # $1 = set name and optional [levels], $2 = src or dst
|
||||
{
|
||||
local temp setname options=$2
|
||||
local temp setname=$1 options=$2
|
||||
|
||||
case $1 in
|
||||
*\[[1-6]\])
|
||||
@ -570,18 +570,17 @@ get_set_flags() # $1 = set name and optional [levels], $2 = src or dst
|
||||
options="$options,$2"
|
||||
temp=$(($temp - 1))
|
||||
done
|
||||
echo "--set ${setname#+} $options"
|
||||
;;
|
||||
*\[*\])
|
||||
temp=${1#*\[}
|
||||
temp=${temp%\]}
|
||||
options=${1#*\[}
|
||||
options=${options%\]}
|
||||
setname=${1%\[*}
|
||||
echo "--set ${setname#+} $temp"
|
||||
;;
|
||||
*)
|
||||
echo "--set ${1#+} $2"
|
||||
;;
|
||||
esac
|
||||
|
||||
echo "--set ${setname#+} $options"
|
||||
}
|
||||
|
||||
#
|
||||
@ -1072,7 +1071,10 @@ validate_hosts_file() {
|
||||
startup_error "Bridged interfaces may not be defined in /etc/shorewall/interfaces: $host"
|
||||
check_bridge_port ${host%%:*}
|
||||
;;
|
||||
*.*.*.*|+*)
|
||||
*.*.*.*)
|
||||
;;
|
||||
+*)
|
||||
eval ${z}_is_complex=Yes
|
||||
;;
|
||||
*)
|
||||
known_interface $host && \
|
||||
@ -1080,6 +1082,12 @@ validate_hosts_file() {
|
||||
check_bridge_port $host
|
||||
;;
|
||||
esac
|
||||
else
|
||||
case $host in
|
||||
+*)
|
||||
eval ${z}_is_complex=Yes
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
for option in $(separate_list $options) ; do
|
||||
@ -6798,7 +6806,7 @@ activate_rules()
|
||||
fi
|
||||
|
||||
case $networks in
|
||||
*.*.*.*)
|
||||
*.*.*.*|+*)
|
||||
if [ "$networks" != 0.0.0.0/0 ]; then
|
||||
if ! list_search $interface $need_broadcast ; then
|
||||
interface_has_option $interface detectnets && need_broadcast="$need_broadcast $interface"
|
||||
|
@ -44,7 +44,7 @@ New Features in version 2.3.0
|
||||
|
||||
Example: "+Mirrors"
|
||||
|
||||
The name of the set may optionally followed by:
|
||||
The name of the set may be optionally followed by:
|
||||
|
||||
a) a number from 1 to 6 enclosed in square brackets ([]) -- this
|
||||
number indicates the maximum number of ipset binding levels that
|
||||
|
Loading…
Reference in New Issue
Block a user