From 1df48b46efbb84b16d96df1e712a89cd8f6ae36c Mon Sep 17 00:00:00 2001 From: Tom Eastep Date: Sun, 7 Oct 2012 08:36:28 -0700 Subject: [PATCH] Enable 'show dynamic' for dynamic zones. Signed-off-by: Tom Eastep --- Shorewall-core/lib.cli | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Shorewall-core/lib.cli b/Shorewall-core/lib.cli index 3309bc971..d1bc8d24a 100644 --- a/Shorewall-core/lib.cli +++ b/Shorewall-core/lib.cli @@ -523,7 +523,7 @@ find_sets() { local junk local setname - $IPSETN -L | grep "^Name: ${1}_" | while read junk setname; do echo $setname; done + $IPSETN -L | egrep "^Name: ${1}(_.+)?$" | while read junk setname; do echo $setname; done } list_zone() { @@ -534,9 +534,9 @@ list_zone() { determine_ipset_version if [ $g_family -eq 4 ]; then - sets=$($IPSETN -L | grep "^$1_"); + sets=$($IPSETN -L | egrep "^$1(_.+)?"); else - sets=$($IPSETN -L | grep "^6_$1_") + sets=$($IPSETN -L | egrep "^6_$1(_.+)?") fi [ -n "$sets" ] || sets=$(find_sets $1)