• David Ahern's avatar
    ip route: Add RTM_F_LOOKUP_TABLE flag and show table id · bc234301
    David Ahern authored
    Currently 'ip route get' does not show the table the lookup result comes
    from and prior to kernel commit c36ba6603a11 the response from the kernel
    was hardcoded to the main table. From the discussion this appears to be
    a leftover from the route cache where the cached entry lost the table id
    and so the result was hardcoded to main table.
    
    c36ba6603a11 added the RTM_F_LOOKUP_TABLE flag to maintain that behavior
    but to allow new tools to ask for the actual table id for the lookup.
    This patch adds that flag to ip route get request and if the result is
    not the main table shows the table id.
    Signed-off-by: default avatarDavid Ahern <dsa@cumulusnetworks.com>
    bc234301
iproute.c 48.6 KB