net: Allow user to get table id from route lookup
authorDavid Ahern <dsa@cumulusnetworks.com>
Wed, 2 Sep 2015 20:58:36 +0000 (13:58 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 15 Sep 2015 19:01:41 +0000 (12:01 -0700)
commitc36ba6603a1154ac617d023bbcc062a12afb258b
tree4ce0ed1e81dcc34125b19cdb7d4c6e431b1bf4bd
parentb7503e0cdb5dbec5d201aa69d8888c14679b5ae8
net: Allow user to get table id from route lookup

rt_fill_info which is called for 'route get' requests hardcodes the
table id as RT_TABLE_MAIN which is not correct when multiple tables
are used. Use the newly added table id in the rtable to send back
the correct table similar to what is done for IPv6.

To maintain current ABI a new request flag, RTM_F_LOOKUP_TABLE, is
added to indicate the actual table is wanted versus the hardcoded
response.

Signed-off-by: David Ahern <dsa@cumulusnetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/uapi/linux/rtnetlink.h
net/ipv4/route.c