diff options
author | Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com> | 2014-02-11 18:36:42 +0200 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2014-02-12 10:10:10 +0100 |
commit | 837629fed24af7298fbf4cd28c7a51f24b70ee93 (patch) | |
tree | 0d55f51f6c6623a1d12da8b75f16cc778ffdc72f /iptables | |
parent | 5cab9c3c8209e9491f0f252e03dd48ae4cb5ab63 (diff) |
nft: Add useful debug output when a builtin table is created
This is useful to know if a builtin table is requested to be created.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'iptables')
-rw-r--r-- | iptables/nft.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/iptables/nft.c b/iptables/nft.c index a45d599b..36ac69cc 100644 --- a/iptables/nft.c +++ b/iptables/nft.c @@ -451,6 +451,14 @@ nft_table_builtin_add(struct nft_handle *h, struct builtin_table *_t, nft_table_nlmsg_build_payload(nlh, t); nft_table_free(t); +#ifdef NLDEBUG + char tmp[1024]; + + nft_table_snprintf(tmp, sizeof(tmp), t, 0, 0); + printf("DEBUG: table: %s", tmp); + mnl_nlmsg_fprintf(stdout, nlh, nlh->nlmsg_len, sizeof(struct nfgenmsg)); +#endif + ret = mnl_talk(h, nlh, NULL, NULL); if (ret < 0) { if (errno != EEXIST) |