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>
This commit is contained in:

committed by
David S. Miller

parent
b7503e0cdb
commit
c36ba6603a
@@ -270,6 +270,7 @@ enum rt_scope_t {
|
||||
#define RTM_F_CLONED 0x200 /* This route is cloned */
|
||||
#define RTM_F_EQUALIZE 0x400 /* Multipath equalizer: NI */
|
||||
#define RTM_F_PREFIX 0x800 /* Prefix addresses */
|
||||
#define RTM_F_LOOKUP_TABLE 0x1000 /* set rtm_table to FIB lookup result */
|
||||
|
||||
/* Reserved table identifiers */
|
||||
|
||||
|
Reference in New Issue
Block a user