From: Florian Westphal <fw@strlen.de>
To: Krishna Kumar2 <krkumar2@in.ibm.com>
Cc: Florian Westphal <fw@strlen.de>,
kaber@trash.net, netfilter-devel@vger.kernel.org,
pablo@netfilter.org, sri@us.ibm.com,
Sulakshan Vajipayajula <svajipay@in.ibm.com>,
vivk@us.ibm.com
Subject: Re: [v4 PATCH 1/1] netfilter: Add fail-open support
Date: Thu, 24 May 2012 12:53:14 +0200 [thread overview]
Message-ID: <20120524105314.GB30569@breakpoint.cc> (raw)
In-Reply-To: <OF029AE6DA.E5969DF9-ON65257A08.003984EF-65257A08.0039E951@in.ibm.com>
Krishna Kumar2 <krkumar2@in.ibm.com> wrote:
> > if (queue->queue_total >= queue->queue_maxlen) {
> > if (queue->flags & NFQA_CFG_F_FAIL_OPEN) {
> > nf_reinject(entry, NF_ACCEPT);
> > err = 0;
> > goto err_out_free_nskb;
> > }
> > queue->queue_dropped++;
> > net_warn_ratelimited("nf_queue: full at %d entries, dropping packets
> (s)\n",
> >
> > [..]
> >
> > Do you see any problems with that?
>
> No, I think it should work fine. Do this after dropping the lock?
Good catch. Yes, the lock should be dropped, else we
deadlock when same queue is hit in next table/chain.
> > > + if (nfqa[NFQA_CFG_FLAGS]) {
> > > + __be32 flags, mask;
> >
> > [..]
> >
> > > + flags = ntohl(nla_get_be32(nfqa[NFQA_CFG_FLAGS]));
> > > + mask = ntohl(nla_get_be32(nfqa[NFQA_CFG_MASK]));
> >
> > ntohl returns __u32 type.
>
> Maybe just use __u32 type for flags/mask?
Yes.
Thanks,
Florian
next prev parent reply other threads:[~2012-05-24 10:53 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-24 8:25 [v4 PATCH 0/1] netfilter: "fail-open" feature support for NFQUEUE Krishna Kumar
2012-05-24 8:25 ` [v4 PATCH 1/1] netfilter: Add fail-open support Krishna Kumar
2012-05-24 9:30 ` Florian Westphal
2012-05-24 10:31 ` Krishna Kumar2
2012-05-24 10:53 ` Florian Westphal [this message]
2012-05-24 10:17 ` Pablo Neira Ayuso
2012-05-24 10:41 ` Pablo Neira Ayuso
2012-05-24 10:49 ` Krishna Kumar2
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=20120524105314.GB30569@breakpoint.cc \
--to=fw@strlen.de \
--cc=kaber@trash.net \
--cc=krkumar2@in.ibm.com \
--cc=netfilter-devel@vger.kernel.org \
--cc=pablo@netfilter.org \
--cc=sri@us.ibm.com \
--cc=svajipay@in.ibm.com \
--cc=vivk@us.ibm.com \
/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).