Netdev List
 help / color / mirror / Atom feed
From: Atis Elsts <atis@mikrotik.com>
To: Guido Trotter <ultrotter@quaqua.net>
Cc: netdev@vger.kernel.org
Subject: Re: Policy routing + route "via" gives a strange behavior
Date: Tue, 20 Oct 2009 19:48:39 +0300	[thread overview]
Message-ID: <200910201948.39778.atis@mikrotik.com> (raw)
In-Reply-To: <20091020132820.GA3159@gg.studio.tixteam.net>

On Tuesday 20 October 2009 16:28:20 you wrote:
> This is also refused unless a route like the one before appears in the
> default table, even though it does appear in table 100. Is this the right
> behavior, and if yes, why? 

I guess what you describe is too infrequent use case for anyone to really 
care. Connected and link scoped routes are usually not added to policy 
routing tables :) Can you explain more for what kind of setup this is needed?

This "issue" could be solved by using routing table in the FIB lookup done in 
fib_check_nh(). However, doing that would break a lot more setups than it 
would "fix".
For example, if you had these rules
  from all to 1.2.3.4 fwmark 0x64 lookup 100
  from all fwmark 0x64 unreachable
then adding policy route to table 100 would fail unless nexthop 1.2.3.4 was 
used...

Anyway, you can achieve what you wish by using the "onlink" option, e.g.:
  ip route add table 100 default dev eth1 via 192.168.5.254 onlink

Atis

  reply	other threads:[~2009-10-20 16:47 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-20 13:28 Policy routing + route "via" gives a strange behavior Guido Trotter
2009-10-20 16:48 ` Atis Elsts [this message]
2009-10-20 17:23   ` Guido Trotter
2009-10-21  8:47     ` Mallika Gautam

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=200910201948.39778.atis@mikrotik.com \
    --to=atis@mikrotik.com \
    --cc=netdev@vger.kernel.org \
    --cc=ultrotter@quaqua.net \
    /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