mirror of
https://gitlab.com/shorewall/code.git
synced 2024-11-09 01:04:06 +01:00
Allow dynamic zones to work with ipset V5
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
38faa3e071
commit
d1bf727127
@ -507,7 +507,7 @@ find_sets() {
|
|||||||
local junk
|
local junk
|
||||||
local setname
|
local setname
|
||||||
|
|
||||||
ipset -L -n | grep "^Name: ${1}_" | while read junk setname; do echo $setname; done
|
ipset -L | grep "^Name: ${1}_" | while read junk setname; do echo $setname; done
|
||||||
}
|
}
|
||||||
|
|
||||||
list_zone() {
|
list_zone() {
|
||||||
@ -518,9 +518,9 @@ list_zone() {
|
|||||||
[ -n "$(mywhich ipset)" ] || fatal_error "The ipset utility cannot be located"
|
[ -n "$(mywhich ipset)" ] || fatal_error "The ipset utility cannot be located"
|
||||||
|
|
||||||
if [ $g_family -eq 4 ]; then
|
if [ $g_family -eq 4 ]; then
|
||||||
sets=$(ipset -L -n | grep '^$1_');
|
sets=$(ipset -L | grep '^$1_');
|
||||||
else
|
else
|
||||||
sets=$(ipset -L -n | grep "^6_$1_")
|
sets=$(ipset -L | grep "^6_$1_")
|
||||||
fi
|
fi
|
||||||
|
|
||||||
[ -n "$sets" ] || sets=$(find_sets $1)
|
[ -n "$sets" ] || sets=$(find_sets $1)
|
||||||
|
Loading…
Reference in New Issue
Block a user