Re: [PATCH net-next v2 0/8] net: extend RTM_GETROUTE to return fib result
From: David Ahern <hidden>
Date: 2017-05-27 14:02:49
From: David Ahern <hidden>
Date: 2017-05-27 14:02:49
On 5/27/17 12:00 AM, Roopa Prabhu wrote:
On Fri, May 26, 2017 at 11:18 AM, David Miller [off-list ref] wrote:quoted
From: Roopa Prabhu <redacted> Date: Thu, 25 May 2017 10:42:32 -0700quoted
This series adds a new RTM_F_FIB_MATCH flag to return matched fib result with RTM_GETROUTE. This is useful for applications and protocols in userspace wanting to query the selected route.Looks good, series applied, thanks.thank you.quoted
Have you considered taking this further and allowing one to see which nexthop a route lookup picked?since the default RTM_GETROUTE output gives most of the attributes from the resolved dst, have not considered adding more to it yet...but certainly can if needed in the future.
One extension is to pass in prefix and length (plus any options to such as metric to uniquely discriminate a route) and get back the route entry. It is needed to retrieve the BPF code for routes with a bpf encap. This patch set makes it easier.