summaryrefslogtreecommitdiffstats
path: root/src/netlink.c
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2013-04-18 12:28:25 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2013-04-18 15:32:54 +0200
commitda24c01b6d94820aee7222aa3c75854ef47bf355 (patch)
tree24dd5da378d9b61f1b20a66f8bc8dc33a5ab787d /src/netlink.c
parent84cf34938294e404fd7e9ebe1a630fe868ae22da (diff)
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 <pablo@netfilter.org>
Diffstat (limited to 'src/netlink.c')
-rw-r--r--src/netlink.c3
1 files changed, 2 insertions, 1 deletions
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;
}