From: Stephen Hemminger <stephen@networkplumber.org>
To: Roopa Prabhu <roopa@cumulusnetworks.com>
Cc: netdev@vger.kernel.org, dsahern@gmail.com, nikolay@cumulusnetworks.com
Subject: Re: [PATCH iproute2] iproute: extend route get to return matching fib route
Date: Mon, 5 Jun 2017 12:34:26 -0700 [thread overview]
Message-ID: <20170605123426.3660e8bf@xeon-e3> (raw)
In-Reply-To: <1496379208-30573-1-git-send-email-roopa@cumulusnetworks.com>
On Thu, 1 Jun 2017 21:53:28 -0700
Roopa Prabhu <roopa@cumulusnetworks.com> wrote:
> From: Roopa Prabhu <roopa@cumulusnetworks.com>
>
> Uses newly introduced RTM_GETROUTE flag RTM_F_FIB_MATCH
> to return a matching fib route. Introduces 'fibmatch'
> keyword to ip route get.
>
> ipv4:
> ----
> $ip route show
> default via 192.168.0.2 dev eth0
> 10.0.14.0/24
> nexthop via 172.16.0.3 dev dummy0 weight 1
> nexthop via 172.16.1.3 dev dummy1 weight 1
>
> $ip route get 10.0.14.2
> 10.0.14.2 via 172.16.1.3 dev dummy1 src 172.16.1.1
> cache
>
> $ip route get fibmatch 10.0.14.2
> 10.0.14.0/24
> nexthop via 172.16.0.3 dev dummy0 weight 1
> nexthop via 172.16.1.3 dev dummy1 weight 1
>
> ipv6:
> ----
> $ip -6 route show
> 2001:db9:100::/120 metric 1024
> nexthop via 2001:db8:2::2 dev dummy0 weight 1
> nexthop via 2001:db8:12::2 dev dummy1 weight 1
>
> $ip -6 route get 2001:db9:100::1
> 2001:db9:100::1 from :: via 2001:db8:12::2 dev dummy1 \
> src 2001:db8:12::1 metric 1024 pref medium
>
> $ip -6 route get fibmatch 2001:db9:100::1
> 2001:db9:100::/120 metric 1024
> nexthop via 2001:db8:12::2 dev dummy1 weight 1
> nexthop via 2001:db8:2::2 dev dummy0 weight 1
>
> Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
Applied to net-next branch
prev parent reply other threads:[~2017-06-05 19:34 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-02 4:53 [PATCH iproute2] iproute: extend route get to return matching fib route Roopa Prabhu
2017-06-02 4:57 ` David Ahern
2017-06-05 19:34 ` Stephen Hemminger [this message]
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=20170605123426.3660e8bf@xeon-e3 \
--to=stephen@networkplumber.org \
--cc=dsahern@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=nikolay@cumulusnetworks.com \
--cc=roopa@cumulusnetworks.com \
/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).