From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Cc: netfilter-devel@vger.kernel.org, Yoann JUET <yoann.juet@univ-nantes.fr>
Subject: Re: [PATCH 1/1] netfilter: ipset: bitmap:ip,mac: fix listing with timeout
Date: Tue, 16 Apr 2013 19:44:42 +0200 [thread overview]
Message-ID: <20130416174441.GA3174@localhost> (raw)
In-Reply-To: <1365857474-4943-2-git-send-email-kadlec@blackhole.kfki.hu>
Hi Jozsef,
On Sat, Apr 13, 2013 at 02:51:14PM +0200, Jozsef Kadlecsik wrote:
> The type when timeout support was enabled, could not list all elements,
> just the first ones which could fit into one netlink message: it just
> did not continue listing after the first message.
>
> Signed-off-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
> ---
> net/netfilter/ipset/ip_set_bitmap_ipmac.c | 6 +++++-
> 1 files changed, 5 insertions(+), 1 deletions(-)
>
> diff --git a/net/netfilter/ipset/ip_set_bitmap_ipmac.c b/net/netfilter/ipset/ip_set_bitmap_ipmac.c
> index 0f92dc2..d7df6ac 100644
> --- a/net/netfilter/ipset/ip_set_bitmap_ipmac.c
> +++ b/net/netfilter/ipset/ip_set_bitmap_ipmac.c
> @@ -339,7 +339,11 @@ bitmap_ipmac_tlist(const struct ip_set *set,
> nla_put_failure:
> nla_nest_cancel(skb, nested);
> ipset_nest_end(skb, atd);
I think this ipset_nest_end should be after the id == first checking.
It doesn't make sense for the -EMSGSIZE case.
BTW, in the first message, where `first' is unset, id will never equal
first and you will always return success even if you could not add one
single nested attribute into the message.
> - return -EMSGSIZE;
> + if (unlikely(id == first)) {
> + cb->args[2] = 0;
> + return -EMSGSIZE;
> + }
> + return 0;
Regards.
next prev parent reply other threads:[~2013-04-16 17:44 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-13 12:51 [PATCH 0/1] ipset fix for nf/net Jozsef Kadlecsik
2013-04-13 12:51 ` [PATCH 1/1] netfilter: ipset: bitmap:ip,mac: fix listing with timeout Jozsef Kadlecsik
2013-04-16 17:44 ` Pablo Neira Ayuso [this message]
2013-04-16 19:16 ` Jozsef Kadlecsik
2013-04-18 22:05 ` Pablo Neira Ayuso
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=20130416174441.GA3174@localhost \
--to=pablo@netfilter.org \
--cc=kadlec@blackhole.kfki.hu \
--cc=netfilter-devel@vger.kernel.org \
--cc=yoann.juet@univ-nantes.fr \
/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.