]> git.ipfire.org Git - thirdparty/iptables.git/commitdiff
nft: Pass a line after printing out a debug message
authorTomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Tue, 11 Feb 2014 16:36:46 +0000 (18:36 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Wed, 12 Feb 2014 09:10:10 +0000 (10:10 +0100)
In this specific places, libnftnl gives back a string on which iptables
should not assume any line break, thus it's up to iptables to add it.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
iptables/nft.c

index d3b9bf010fbe397cb0ecb8198e98f5fa3b3d3e4e..1237659f15808ee94d6736e20dcfa6b07053af84 100644 (file)
@@ -458,7 +458,7 @@ nft_table_builtin_add(struct nft_handle *h, struct builtin_table *_t,
        char tmp[1024];
 
        nft_table_snprintf(tmp, sizeof(tmp), t, 0, 0);
-       printf("DEBUG: table: %s", tmp);
+       printf("DEBUG: table: %s\n", tmp);
        mnl_nlmsg_fprintf(stdout, nlh, nlh->nlmsg_len, sizeof(struct nfgenmsg));
 #endif
 
@@ -702,7 +702,7 @@ static void nft_chain_print_debug(struct nft_chain *c, struct nlmsghdr *nlh)
        char tmp[1024];
 
        nft_chain_snprintf(tmp, sizeof(tmp), c, 0, 0);
-       printf("DEBUG: chain: %s", tmp);
+       printf("DEBUG: chain: %s\n", tmp);
        mnl_nlmsg_fprintf(stdout, nlh, nlh->nlmsg_len, sizeof(struct nfgenmsg));
 #endif
 }
@@ -898,7 +898,7 @@ static void nft_rule_print_debug(struct nft_rule *r, struct nlmsghdr *nlh)
        char tmp[1024];
 
        nft_rule_snprintf(tmp, sizeof(tmp), r, 0, 0);
-       printf("DEBUG: rule: %s", tmp);
+       printf("DEBUG: rule: %s\n", tmp);
        mnl_nlmsg_fprintf(stdout, nlh, nlh->nlmsg_len, sizeof(struct nfgenmsg));
 #endif
 }