From: Steven Barth <steven@midlink.org>
To: Matthias Schiffer <mschiffer@universe-factory.net>,
Markus Stenberg <markus.stenberg@iki.fi>
Cc: "David S. Miller" <davem@davemloft.net>,
Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>,
James Morris <jmorris@namei.org>,
Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>,
Patrick McHardy <kaber@trash.net>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] ipv6: Fixed source specific default route handling.
Date: Mon, 22 Jun 2015 07:58:48 +0200 [thread overview]
Message-ID: <5587A418.4000308@midlink.org> (raw)
In-Reply-To: <55873C46.4090804@universe-factory.net>
On 22.06.2015 00:35, Matthias Schiffer wrote:
> Could you explain in detail what you mean with "If you want specific SA,
> add same route with higher metric and/or (more) specific src match."?
> Routes aren't bound to specific addresses except via the "src" attribute
> (which is called prefsrc in the kernel), which is exactly what it not
> working. I can't control the chosen source address at all when
> source-specific routes are involved.
Except that prefsrc and src are two different beasts and usually ip route from transates to
RTA_SRC instead of RTA_PREFSOURCE when used with a prefix length.
Try adding two routes to the same destination with the same metric but different source values with PREFSRC (e.g. IPv4) and then
try doing the same with SRC (e.g. IPv6). The former will fail but the latter will succeed.
https://tools.ietf.org/html/draft-troan-homenet-sadr-01
was the original draft for source-address dependent routing IIRC so might be a good read.
>
> Even though the source-specific route has a higher metric than the
> generic one, the source-specific one shadows the generic route.
(was a bit ago since I read into this so please correct me if I am wrong)
IIRC this is intentional since longest-prefix-match beats metric here
and the source-address match counts to being more-specific here. See also above difference between PREFSRC and SRC.
Cheers,
Steven
next prev parent reply other threads:[~2015-06-22 6:29 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-05 10:36 [PATCH] ipv6: Fixed source specific default route handling Markus Stenberg
2015-05-09 19:59 ` David Miller
2015-06-21 17:18 ` Matthias Schiffer
2015-06-21 22:05 ` Markus Stenberg
2015-06-21 22:35 ` Matthias Schiffer
2015-06-21 23:01 ` Markus Stenberg
2015-06-22 5:58 ` Steven Barth [this message]
2015-06-22 17:51 ` Matthias Schiffer
2015-06-23 1:54 ` YOSHIFUJI Hideaki/吉藤英明
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=5587A418.4000308@midlink.org \
--to=steven@midlink.org \
--cc=davem@davemloft.net \
--cc=jmorris@namei.org \
--cc=kaber@trash.net \
--cc=kuznet@ms2.inr.ac.ru \
--cc=linux-kernel@vger.kernel.org \
--cc=markus.stenberg@iki.fi \
--cc=mschiffer@universe-factory.net \
--cc=netdev@vger.kernel.org \
--cc=yoshfuji@linux-ipv6.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;
as well as URLs for NNTP newsgroup(s).