path: root/src/internal.h
diff options
authorArturo Borrero <>2014-01-18 17:01:44 +0100
committerPablo Neira Ayuso <>2014-01-18 21:50:22 +0100
commit871c7fd0204325b947a5fde3ab8617ef89b9168f (patch)
tree22988ceef9730a8c41265e619335a7228457ec2c /src/internal.h
parentcd9a80990abb035fba5810bbeb0ecdff46425d2f (diff)
utils: fix nft_str2verdict return value
Some verdicts have a negative value. The caller of nft_str2verdict() checking if return was < 0 clash with enum nft_verdict. While at it, add error reporting of invalid verdicts. Signed-off-by: Arturo Borrero Gonzalez <> Signed-off-by: Pablo Neira Ayuso <>
Diffstat (limited to 'src/internal.h')
1 files changed, 1 insertions, 1 deletions
diff --git a/src/internal.h b/src/internal.h
index ab12cec..256dd3d 100644
--- a/src/internal.h
+++ b/src/internal.h
@@ -131,7 +131,7 @@ const char *nft_family2str(uint32_t family);
int nft_str2family(const char *family);
int nft_strtoi(const char *string, int base, void *number, enum nft_type type);
const char *nft_verdict2str(uint32_t verdict);
-int nft_str2verdict(const char *verdict);
+int nft_str2verdict(const char *verdict, int *verdict_num);
int nft_get_value(enum nft_type type, void *val, void *out);
#include <stdio.h>