All of lore.kernel.org
 help / color / mirror / Atom feed
From: Patrick McHardy <kaber@trash.net>
To: Darryl Miles <darryl-mailinglists@netbauds.net>
Cc: netfilter-devel@vger.kernel.org
Subject: Re: Can NFQUEUE accept/continue when there is no userspace listener registered ?
Date: Thu, 04 Nov 2010 05:37:54 +0100	[thread overview]
Message-ID: <4CD238A2.8070900@trash.net> (raw)
In-Reply-To: <4CD22E08.2060300@netbauds.net>

On 04.11.2010 04:52, Darryl Miles wrote:
> Is there any mechanism which would allow additional options to NFQUEUE
> target to instruct the kernel what to do:
> 
>  --action-no-listener NF_ACCEPT|NF_DROP|CONTINUE  (with NF_DROP being
> the default)
>  --action-backlog-overflow NF_ACCEPT|NF_DROP|CONTINUE   (with NF_DROP
> being the default)

--action-no-listener is hard to do because the rule has no direct
connection to the queue and backend queueing mechanism and thus
it can't determine whether a listener exists. There's also currently
no way to propagate that information to the backend. Well, maybe
you could encode it in the verdict, similar to the queue number.

--action-backlog-overflow should be pretty easy to add to the
queueing backend itself (nfnetlink_queue), however when the packet
reaches the backend, it has already left the ruleset, so it won't
continue in the chain but instead continue as if a verdict of
NF_ACCEPT had been issued.

> Where CONTINUE would in effect ignore the existence of the "-j NFQUEUE"
> rule in the chain and continue to the next rule.  I guess this is
> possible if the packet never made it to user-space.
> 
> 
> Would there be any objections to providing a patch to kernel and
> userspace tooling to provide this configurable behavior ?   Is it
> obviously useful to others ?

Having the packet continue when the queue overflows has been requested
a couple of times for hung snort processes, so yes, this sounds useful.
If you can implement the no-listener feature in a reasonable way that
also sounds useful.

  reply	other threads:[~2010-11-04  4:37 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-04  3:52 Can NFQUEUE accept/continue when there is no userspace listener registered ? Darryl Miles
2010-11-04  4:37 ` Patrick McHardy [this message]
2010-11-05  0:08   ` Pablo Neira Ayuso
2010-11-05  9:29     ` Patrick McHardy
2010-11-05  9:33       ` 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=4CD238A2.8070900@trash.net \
    --to=kaber@trash.net \
    --cc=darryl-mailinglists@netbauds.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 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.