From: Pablo Neira Ayuso <pablo@netfilter.org>
To: "Carlos Falgueras García" <carlosfg@riseup.net>
Cc: netfilter-devel@vger.kernel.org
Subject: Re: [PATCH v2, libnftnl] Fix nftnl_*_get to set data_len
Date: Mon, 11 Jul 2016 13:48:07 +0200 [thread overview]
Message-ID: <20160711114807.GA1788@salvia> (raw)
In-Reply-To: <1468237267-15246-1-git-send-email-carlosfg@riseup.net>
On Mon, Jul 11, 2016 at 01:41:07PM +0200, Carlos Falgueras García wrote:
> diff --git a/src/expr/lookup.c b/src/expr/lookup.c
> index 7f68f74..a29b7e5 100644
> --- a/src/expr/lookup.c
> +++ b/src/expr/lookup.c
> @@ -73,10 +73,13 @@ nftnl_expr_lookup_get(const struct nftnl_expr *e, uint16_t type,
> *data_len = sizeof(lookup->dreg);
> return &lookup->dreg;
> case NFTNL_EXPR_LOOKUP_SET:
> + *data_len = strlen(lookup->set_name) + 1;
> return lookup->set_name;
> case NFTNL_EXPR_LOOKUP_SET_ID:
> + *data_len = sizeof(lookup->set_id) + 1;
> return &lookup->set_id;
> case NFTNL_EXPR_LOOKUP_FLAGS:
> + *data_len = sizeof(lookup->flags) + 1;
This + 1 here doesn't make any sense.
Please, send v3 without all these + 1.
And as I said in the previous version, you have to return strlen() as is.
--
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
next prev parent reply other threads:[~2016-07-11 11:48 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 ` [PATCH libnfntl v2] " Carlos Falgueras García
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 [this message]
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=20160711114807.GA1788@salvia \
--to=pablo@netfilter.org \
--cc=carlosfg@riseup.net \
--cc=netfilter-devel@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).