Linux Netfilter development
 help / color / mirror / Atom feed
From: "James King" <t.james.king@gmail.com>
To: "Jan Engelhardt" <jengelh@medozas.de>
Cc: "Jozsef Kadlecsik" <kadlec@blackhole.kfki.hu>,
	"Phil Oester" <kernel@linuxace.com>,
	netfilter-devel@vger.kernel.org
Subject: Re: [PATCH,RFC] Route match
Date: Thu, 3 Jul 2008 17:19:36 -0700	[thread overview]
Message-ID: <38bcb3ec0807031719n6cdc3233m605271c638b5716f@mail.gmail.com> (raw)
In-Reply-To: <alpine.LNX.1.10.0807040054120.1890@fbirervta.pbzchgretzou.qr>

On Thu, Jul 3, 2008 at 4:02 PM, Jan Engelhardt <jengelh@medozas.de> wrote:

> Routing tables become xtables chains. We would not lose anything.
> In fact, you would gain the possibilty to jump to further chains,
> something not possible in routing today.
>
> rt input:
>
> ip rule fwmark 5 table 5
> ip rule fwmark 6 table 6
> ip route add 10.10.96.2/32 dev eth2 table 5
> ip route add via 10.10.96.1 dev eth0 table 5 # default route
> ip route add via 10.11.96.1 dev eth1 table 6 # default orute
>
> in xtables (ROUTE is a terminating target):
>
> -N table5
> -N table6
> -A table5 -d 10.10.96.2 -j ROUTE --dev eth2
> -A table5 -j ROUTE --via 10.10.96.1 --dev eth0  # default route!
> -A table6 -j ROUTE --via 10.11.96.1 --dev eth1  # also a default
> -A ROUTING -m mark --mark 5 -j table5
> -A ROUTING -m mark --mark 6 -j table6

Wouldn't this break with normal routing concepts, since xtables
traverses the chain linearly, while routing lookups use longest prefix
match (most specific route wins)?  IOW, unless xtables automatically
inserted the rule into the correct spot in the chain (as opposed to
just appending to the end of the chain like -A implies), you could run
into situations where specifying the rules out of order would send the
packet to the wrong next-hop.


Regards,
James

  reply	other threads:[~2008-07-04  0:19 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-03  0:39 [PATCH,RFC] Route match Phil Oester
2008-07-03  7:18 ` Jan Engelhardt
2008-07-03  9:50   ` Jozsef Kadlecsik
2008-07-03 11:22     ` Jan Engelhardt
2008-07-03 12:39       ` Jozsef Kadlecsik
2008-07-03 13:13         ` Jan Engelhardt
2008-07-03 13:31           ` Jozsef Kadlecsik
2008-07-03 14:15             ` Jan Engelhardt
2008-07-03 22:02               ` Jozsef Kadlecsik
2008-07-03 23:02                 ` Jan Engelhardt
2008-07-04  0:19                   ` James King [this message]
2008-07-04  0:37                     ` Jan Engelhardt
2008-07-03 15:51       ` Krzysztof Oledzki
2008-07-03 16:07         ` Jan Engelhardt
2008-07-03 16:10           ` Patrick McHardy
2008-07-03 16:14           ` Krzysztof Oledzki
2008-07-03 16:14         ` Jan Engelhardt
2008-07-04 13:47           ` Benny Amorsen
2008-07-04 15:15       ` Henrik Nordstrom
2008-07-03 18:53     ` Patrick McHardy
2008-07-03 22:21       ` Jozsef Kadlecsik
2008-07-04 20:26         ` Jozsef Kadlecsik
2008-07-03  7:22 ` [PATCH,RFC] Route match, kernel Jan Engelhardt
2008-07-03 16:27   ` Phil Oester
2008-07-03  7:26 ` [PATCH,RFC] Route match, user Jan Engelhardt
2008-07-03 16:29   ` Phil Oester
2008-07-03 16:55     ` Jan Engelhardt

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=38bcb3ec0807031719n6cdc3233m605271c638b5716f@mail.gmail.com \
    --to=t.james.king@gmail.com \
    --cc=jengelh@medozas.de \
    --cc=kadlec@blackhole.kfki.hu \
    --cc=kernel@linuxace.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox