All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Engelhardt <jengelh@medozas.de>
To: Data Shock <datashock@hotmail.com>
Cc: netfilter@vger.kernel.org
Subject: Re: Is a match-all rule with jump to empty chain processed?
Date: Tue, 14 Sep 2010 19:57:37 +0200 (CEST)	[thread overview]
Message-ID: <alpine.LNX.2.01.1009141954390.23103@obet.zrqbmnf.qr> (raw)
In-Reply-To: <BLU124-W223DA5F1742B40AD5E2ABBA3780@phx.gbl>

On Tuesday 2010-09-14 17:14, Data Shock wrote:

>I have an optimization question regarding iptables:  Will a rule that 
>matches all packets and jumps to a defined but empty table be 
>processed? And if so, how much overhead is involved with jumping to an 
>empty table?

Jumping to arbitrary tables is not within the design.

>-t filter -N empty_chain
>-t filter -A INPUT -j empty_chain

That is a chain, not a table. And yes, it is processed including 
overhead, as is done in many other kernel subsystems. The kernel really 
is not responsible for the user's misdeeds. not use empty chains :)


>When an override is required, like "allow all UDP destined for port 
>1234", the cron job could run a simple "iptables -t filter -A overrides 
>-p udp -m udp --dport 1234 -j ACCEPT".  When the override was no longer 
>needed, it could simply flush the overrides chain.
>
>Under normal operation the overrides chain would be empty.  I hate to 
>spend overhead processing the "match all jump to overrides" rule.

I'd say benchmark it before calling it a problem.

  reply	other threads:[~2010-09-14 17:57 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-14 15:14 Is a match-all rule with jump to empty chain processed? Data Shock
2010-09-14 17:57 ` Jan Engelhardt [this message]
2010-09-14 20:34   ` Data Shock

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=alpine.LNX.2.01.1009141954390.23103@obet.zrqbmnf.qr \
    --to=jengelh@medozas.de \
    --cc=datashock@hotmail.com \
    --cc=netfilter@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.