[libnftables PATCH 2/2] examples: nft-set-get: retrieve all sets

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Other nftables objects are allowed to be dumped with NFPROTO_UNSPEC.
With sets is also possible since kernel patch [b63108a] (netfilter: nf_tables:
allow to dump sets with NFPROTO_UNSPEC).

Signed-off-by: Arturo Borrero Gonzalez <arturo.borrero.glez@xxxxxxxxx>
---
 examples/nft-set-get.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/examples/nft-set-get.c b/examples/nft-set-get.c
index 4bc585c..672026f 100644
--- a/examples/nft-set-get.c
+++ b/examples/nft-set-get.c
@@ -74,8 +74,10 @@ int main(int argc, char *argv[])
 		family = NFPROTO_BRIDGE;
 	else if (strcmp(argv[1], "arp") == 0)
 		family = NFPROTO_ARP;
+	else if (strcmp(argv[1], "any") == 0)
+		family = NFPROTO_UNSPEC;
 	else {
-		fprintf(stderr, "Unknown family: ip, ip6, bridge, arp\n");
+		fprintf(stderr, "Unknown family: ip, ip6, bridge, arp, any\n");
 		exit(EXIT_FAILURE);
 	}
 

--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux