diff options
author | Stig Thormodsrud <stig@io.vyatta.com> | 2009-02-13 18:24:12 -0800 |
---|---|---|
committer | Stig Thormodsrud <stig@io.vyatta.com> | 2009-02-13 18:24:12 -0800 |
commit | f638fad8d8550624c2ea2928f562fb953a27456c (patch) | |
tree | 6aa5acee2371477ea55f7aa28b5db586824be118 /scripts/firewall/vyatta-ipset.pl | |
parent | 95aa4b58d430551ec0087f1951f4a2d7e18a2497 (diff) | |
download | vyatta-cfg-firewall-f638fad8d8550624c2ea2928f562fb953a27456c.tar.gz vyatta-cfg-firewall-f638fad8d8550624c2ea2928f562fb953a27456c.zip |
Add description and references to "show firewall group".
Diffstat (limited to 'scripts/firewall/vyatta-ipset.pl')
-rwxr-xr-x | scripts/firewall/vyatta-ipset.pl | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/scripts/firewall/vyatta-ipset.pl b/scripts/firewall/vyatta-ipset.pl index 81e3e47..7d6b783 100755 --- a/scripts/firewall/vyatta-ipset.pl +++ b/scripts/firewall/vyatta-ipset.pl @@ -97,13 +97,19 @@ sub ipset_show_members { my ($set_name) = @_; die "Error: undefined set_name\n" if ! defined $set_name; - my $group = new Vyatta::IpTables::IpSet($set_name); + my $group = new Vyatta::IpTables::IpSet($set_name); return "Group [$set_name] has not been defined\n" if ! $group->exists(); my $type = $group->get_type(); my @members = $group->get_members(); - print "Name : $set_name\n"; - print "Type : $type\n"; - print "Members:\n"; + my $desc = $group->get_description(); + my @fw_refs = $group->get_firewall_references(); + push @fw_refs, 'none' if scalar(@fw_refs) == 0; + + print "Name : $set_name\n"; + print "Type : $type\n"; + print "Description: $desc\n" if defined $desc; + print "References : ", join(', ', @fw_refs), "\n"; + print "Members :\n"; print @members; return; } |