All of lore.kernel.org
 help / color / mirror / Atom feed
From: Patrick McHardy <kaber@trash.net>
To: Kuzin Andrey <kuzinandrey@yandex.ru>
Cc: netfilter-devel@vger.kernel.org
Subject: Re: [PATCH]: drop packet without verdict from nfqueue after timeout
Date: Mon, 23 Mar 2009 20:18:45 +0100	[thread overview]
Message-ID: <49C7E095.9020002@trash.net> (raw)
In-Reply-To: <1691181420.20090323214823@yandex.ru>

Kuzin Andrey wrote:
> This is patch for problem with stucked packets in nf_queue if
> something going wrong in userspace program. Automatically drop packets
> without any verdict after timeout defined by NFQNL_TIMEOUT_ENTRY_DROP.

I don't want to add per-packet timeouts. The number one problem cause
I've seen in userspace programs so far has been "missed" packets by
incorrect application logic/error handling. These applications usually
continue to send verdicts, they just miss some packets, which accumulate
in the queue until it is full.

There's a very easy and cheap way to handle this. The packets have
sequence numbers and userspace should issues verdicts in ascending
order anyways to avoid reordering. Just add something that will drop
everything in the queue up to the sequence number contained in the
netlink message. And if you want to make it seem like something that
isn't just meant to work around buggy application behaviour, you can
use the same mechanism to add verdict batching :)


  reply	other threads:[~2009-03-23 19:18 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-23 18:48 [PATCH]: drop packet without verdict from nfqueue after timeout Kuzin Andrey
2009-03-23 19:18 ` Patrick McHardy [this message]
2009-03-23 22:05   ` Eric Leblond
2009-03-23 22:15     ` Patrick McHardy
2009-03-24  5:23       ` Re[2]: " Kuzin Andrey
2009-03-24  3:17     ` Kuzin Andrey
  -- strict thread matches above, loose matches on Subject: below --
2009-03-23 18:43 Kuzin Andrey

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=49C7E095.9020002@trash.net \
    --to=kaber@trash.net \
    --cc=kuzinandrey@yandex.ru \
    --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.