From da24c01b6d94820aee7222aa3c75854ef47bf355 Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Thu, 18 Apr 2013 12:28:25 +0200 Subject: rule: allow to list of existing tables You can now specify: nft list tables ip to obtain the list of all existing tables. Signed-off-by: Pablo Neira Ayuso --- src/netlink.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/netlink.c') diff --git a/src/netlink.c b/src/netlink.c index 4c60c4a2..e760ccc9 100644 --- a/src/netlink.c +++ b/src/netlink.c @@ -87,7 +87,8 @@ struct nfnl_nft_table *alloc_nft_table(const struct handle *h) if (nlt == NULL) memory_allocation_error(); nfnl_nft_table_set_family(nlt, h->family); - nfnl_nft_table_set_name(nlt, h->table, strlen(h->table) + 1); + if (h->table != NULL) + nfnl_nft_table_set_name(nlt, h->table, strlen(h->table) + 1); return nlt; } -- cgit v1.2.3