Allow dynamic zones to work with ipset V5

Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
Tom Eastep 2012-09-30 08:52:56 -07:00
parent 38faa3e071
commit d1bf727127

View File

@ -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)