All of lore.kernel.org
 help / color / mirror / Atom feed
From: Amin Azez <azez@ufomechanic.net>
To: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Cc: netfilter-devel@lists.netfilter.org,
	Henrik Nordstrom <henrik@henriknordstrom.net>,
	Patrick McHardy <kaber@trash.net>,
	Jan Engelhardt <jengelh@linux01.gwdg.de>
Subject: Re: [PATCH 1/1] Re: dangerous? Setting mark in nat table
Date: Wed, 14 Mar 2007 14:11:59 +0000	[thread overview]
Message-ID: <45F802AF.6010307@ufomechanic.net> (raw)
In-Reply-To: <Pine.LNX.4.64.0703141415200.26704@blackhole.kfki.hu>

* Jozsef Kadlecsik wrote, On 14/03/07 13:21:
> Hi,
>
> On Wed, 14 Mar 2007, Patrick McHardy wrote:
>
>> Amin Azez wrote:
>>> Signed-off-by: Sam Liddicott <azez@ufomechanic.net>
>>> ------------------------------------------------------------------------
>>>
>>>
>>> Index: linux-2.6.17.1/net/netfilter/xt_CONNMARK.c
>>> Index: linux-2.6.17.1/net/netfilter/xt_MARK.c
>>
>> There are quite a few more that are restricted to mangle without
>> good reason:
>>
>> net/netfilter/xt_CLASSIFY.c: .table = "mangle",
>> net/netfilter/xt_CONNSECMARK.c: .table = "mangle",
>> net/netfilter/xt_DSCP.c: .table = "mangle",
>> net/netfilter/xt_MARK.c: .table = "mangle",
>> net/netfilter/xt_SECMARK.c: .table = "mangle",
>> net/ipv4/netfilter/ipt_ECN.c: .table = "mangle",
>> net/ipv4/netfilter/ipt_TOS.c: .table = "mangle",
>> net/ipv4/netfilter/ipt_TTL.c: .table = "mangle",
>> net/ipv6/netfilter/ip6t_HL.c: .table = "mangle",
>>
>> If we're going to remove this, I think we should do it for all of them.
>
> Sorry, but I disagree. The DSCP, ECN, TOS, TTL, HL targets modify the
> packet itself and thus all belong to the mangle table alone.
I'd like to be with Jozsef on that (while we have the current framework,
although I hate the mangle/filter distinction) except that local-out
packets at least have a FILTER after DNAT before routing, but
bridged/routed packets don't have anything betweenPREROUTING DNAT and
routing. With the current framework we could do with a FILTER and MANGLE
both before and after NAT on PREROUTING and communicate using marks.

However, to me, NAT is just a 1-packet MANGLE; and FILTER and MANGLE are
an arbitrary distinction.

It would make more sense to have only 1 table and let users invent
NAT/MANGLE/FILTER chains if they wanted (for old times sake); and just
treat snat and dnat targets as if they had an implicit "-m ctstate
--ctstate NEW".

Am I right, or do tables still help?

Sam

  parent reply	other threads:[~2007-03-14 14:11 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-13 15:25 dangerous? Setting mark in nat table Amin Azez
2007-03-13 15:36 ` Jan Engelhardt
2007-03-13 16:12   ` Amin Azez
2007-03-13 16:18     ` Jan Engelhardt
2007-03-14 10:35       ` Henrik Nordstrom
2007-03-14 11:02         ` Patrick McHardy
2007-03-14 12:43           ` Henrik Nordstrom
2007-03-14 12:52             ` [PATCH 1/1] " Amin Azez
2007-03-14 13:08               ` Patrick McHardy
2007-03-14 13:21                 ` Jozsef Kadlecsik
2007-03-14 14:09                   ` Jozsef Kadlecsik
2007-03-14 20:35                     ` Patrick McHardy
2007-03-14 20:45                       ` Henrik Nordstrom
2007-03-14 20:48                         ` Jan Engelhardt
2007-03-14 22:21                           ` Henrik Nordstrom
2007-03-14 22:58                             ` Carl-Daniel Hailfinger
2007-03-14 23:02                               ` Patrick McHardy
2007-03-14 23:12                                 ` Jan Engelhardt
2007-03-14 23:15                                   ` Patrick McHardy
2007-03-15 13:12                                 ` Roberto Nibali
2007-03-16 12:31                                   ` Patrick McHardy
2007-03-15  0:41                               ` Henrik Nordstrom
2007-03-14 14:11                   ` Amin Azez [this message]
2007-03-14 14:32                     ` One unified table of nat/mangle/filter Henrik Nordstrom
2007-03-14 14:47                     ` [PATCH 1/1] Re: dangerous? Setting mark in nat table Jozsef Kadlecsik
2007-03-14 16:47                     ` Jan Engelhardt
2007-03-14 13:14               ` Henrik Nordstrom
2007-03-14 12:43         ` Amin Azez
2007-03-14 10:27 ` Henrik Nordstrom

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=45F802AF.6010307@ufomechanic.net \
    --to=azez@ufomechanic.net \
    --cc=henrik@henriknordstrom.net \
    --cc=jengelh@linux01.gwdg.de \
    --cc=kaber@trash.net \
    --cc=kadlec@blackhole.kfki.hu \
    --cc=netfilter-devel@lists.netfilter.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.