All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Carlos Falgueras García" <carlosfg@riseup.net>
To: netfilter-devel@vger.kernel.org
Cc: pablo@netfilter.org
Subject: [PATCH libnfntl v2] set: Fix nftnl_set_set_str
Date: Fri,  1 Jul 2016 18:07:15 +0200	[thread overview]
Message-ID: <1467389235-26632-1-git-send-email-carlosfg@riseup.net> (raw)
In-Reply-To: <20160701142247.GA8806@salvia>

We need the string length

Signed-off-by: Carlos Falgueras García <carlosfg@riseup.net>
---
 src/set.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/set.c b/src/set.c
index 47e0c45..8a025ab 100644
--- a/src/set.c
+++ b/src/set.c
@@ -190,7 +190,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);
 
-- 
2.5.1

--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2016-07-01 16:07 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-27 16:24 [PATCH libnftnl] set: Fix nftnl_set_set_str Carlos Falgueras García
2016-06-27 16:29 ` Carlos Falgueras García
2016-07-01 14:22 ` Pablo Neira Ayuso
2016-07-01 16:07   ` Carlos Falgueras García [this message]
2016-07-01 16:11   ` [PATCH libnftnl] Fix string length calculations Carlos Falgueras García
2016-07-02  6:54     ` Pablo Neira Ayuso
2016-07-03 10:13       ` Carlos Falgueras García
2016-07-05 12:31         ` Pablo Neira Ayuso
2016-07-05 17:15           ` [PATCH 1/2 libnfntl] Fix nftnl_*_set_str Carlos Falgueras García
2016-07-05 17:15             ` [PATCH 2/2 libnfntl] Fix nftnl_*_get to set data_len Carlos Falgueras García
2016-07-06 15:21               ` Pablo Neira Ayuso
2016-07-11 11:41                 ` [PATCH v2, libnftnl] " Carlos Falgueras García
2016-07-11 11:48                   ` Pablo Neira Ayuso
2016-07-11 16:07                     ` [PATCH v3, " Carlos Falgueras García
2016-07-11 17:18                       ` Pablo Neira Ayuso
2016-07-11 10:24               ` [PATCH 2/2 libnfntl] " Pablo Neira Ayuso
2016-07-11 10:25                 ` Pablo Neira Ayuso
2016-07-06 15:19             ` [PATCH 1/2 libnfntl] Fix nftnl_*_set_str Pablo Neira Ayuso
2016-07-01 16:13   ` [PATCH libnftnl] set: Fix nftnl_set_set_str Carlos Falgueras García

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1467389235-26632-1-git-send-email-carlosfg@riseup.net \
    --to=carlosfg@riseup.net \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=pablo@netfilter.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.