diff options
-rw-r--r-- | src/chain.c | 2 | ||||
-rw-r--r-- | src/rule.c | 2 | ||||
-rw-r--r-- | src/set.c | 2 | ||||
-rw-r--r-- | src/set_elem.c | 2 | ||||
-rw-r--r-- | src/table.c | 2 |
5 files changed, 5 insertions, 5 deletions
diff --git a/src/chain.c b/src/chain.c index bfffbe0..cab64b5 100644 --- a/src/chain.c +++ b/src/chain.c @@ -260,7 +260,7 @@ EXPORT_SYMBOL_ALIAS(nftnl_chain_set_u8, nft_chain_attr_set_u8); int nftnl_chain_set_str(struct nftnl_chain *c, uint16_t attr, const char *str) { - return nftnl_chain_set_data(c, attr, str, strlen(str)); + return nftnl_chain_set_data(c, attr, str, strlen(str) + 1); } EXPORT_SYMBOL_ALIAS(nftnl_chain_set_str, nft_chain_attr_set_str); @@ -198,7 +198,7 @@ EXPORT_SYMBOL_ALIAS(nftnl_rule_set_u64, nft_rule_attr_set_u64); int nftnl_rule_set_str(struct nftnl_rule *r, uint16_t attr, const char *str) { - return nftnl_rule_set_data(r, attr, str, strlen(str)); + return nftnl_rule_set_data(r, attr, str, strlen(str) + 1); } EXPORT_SYMBOL_ALIAS(nftnl_rule_set_str, nft_rule_attr_set_str); @@ -203,7 +203,7 @@ EXPORT_SYMBOL_ALIAS(nftnl_set_set_u64, nft_set_attr_set_u64); int nftnl_set_set_str(struct nftnl_set *s, uint16_t attr, const char *str) { - return nftnl_set_set(s, attr, str); + return nftnl_set_set_data(s, attr, str, strlen(str) + 1); } EXPORT_SYMBOL_ALIAS(nftnl_set_set_str, nft_set_attr_set_str); diff --git a/src/set_elem.c b/src/set_elem.c index 00b7327..40b5bfe 100644 --- a/src/set_elem.c +++ b/src/set_elem.c @@ -149,7 +149,7 @@ EXPORT_SYMBOL_ALIAS(nftnl_set_elem_set_u64, nft_set_elem_attr_set_u64); int nftnl_set_elem_set_str(struct nftnl_set_elem *s, uint16_t attr, const char *str) { - return nftnl_set_elem_set(s, attr, str, strlen(str)); + return nftnl_set_elem_set(s, attr, str, strlen(str) + 1); } EXPORT_SYMBOL_ALIAS(nftnl_set_elem_set_str, nft_set_elem_attr_set_str); diff --git a/src/table.c b/src/table.c index 32d119f..966b923 100644 --- a/src/table.c +++ b/src/table.c @@ -131,7 +131,7 @@ EXPORT_SYMBOL_ALIAS(nftnl_table_set_u8, nft_table_attr_set_u8); int nftnl_table_set_str(struct nftnl_table *t, uint16_t attr, const char *str) { - return nftnl_table_set_data(t, attr, str, 0); + return nftnl_table_set_data(t, attr, str, strlen(str) + 1); } EXPORT_SYMBOL_ALIAS(nftnl_table_set_str, nft_table_attr_set_str); |