On 09/30/2012 08:00 AM, Tom Eastep wrote:
> On 09/29/2012 11:47 PM, Gémes Géza wrote:

>> I've observed two strange/misunderstood behaviors/errors:
> 
>> 1. shorewall show dynamic nonet
>> returns nothing
> 
> Do you really mean 'nothing', or do you mean that it returns:
> 
> lan-if:
> 
> followed by a blank line?
> 
> Here's an example:
> 
> root@gateway:/etc/shorewall# shorewall show dynamic direct
> eth2:
> 
> root@gateway:

I did some more testing on a Fedora 17 system and discovered that newer
versions of ipset produce no output in this case. I've attached a patch
for /usr/share/shorewall/lib.cli.

        patch /usr/share/shorewall/lib.cli < DYNAMIC.patch

-Tom
-- 
Tom Eastep        \ When I die, I want to go like my Grandfather who
Shoreline,         \ died peacefully in his sleep. Not screaming like
Washington, USA     \ all of the passengers in his car
http://shorewall.net \________________________________________________
diff --git a/Shorewall-core/lib.cli b/Shorewall-core/lib.cli
index 3cf4fcb..8e2c4c0 100644
--- a/Shorewall-core/lib.cli
+++ b/Shorewall-core/lib.cli
@@ -507,7 +507,7 @@ find_sets() {
     local junk
     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() {
@@ -516,11 +516,11 @@ list_zone() {
     local setname
 
     [ -n "$(mywhich ipset)" ] || fatal_error "The ipset utility cannot be located"
-
+    
     if [ $g_family -eq 4 ]; then
-	sets=$(ipset -L -n | grep '^$1_');
+	sets=$(ipset -L | grep '^$1_');
      else
-	sets=$(ipset -L -n | grep "^6_$1_")
+	sets=$(ipset -L | grep "^6_$1_")
     fi
 
     [ -n "$sets" ] || sets=$(find_sets $1)

Attachment: signature.asc
Description: OpenPGP digital signature

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://ad.doubleclick.net/clk;258768047;13503038;j?
http://info.appdynamics.com/FreeJavaPerformanceDownload.html
_______________________________________________
Shorewall-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/shorewall-users

Reply via email to