ip route: get: only set RTM_F_LOOKUP_TABLE flag for IPv4
Kernel ignores the RTM_F_LOOKUP_TABLE flag for all families but IPv4. Don't set it, otherwise it may fall foul of strict checking policies. Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
This commit is contained in:
parent
dc0332b1e8
commit
8513f4a926
|
|
@ -2068,7 +2068,9 @@ static int iproute_get(int argc, char **argv)
|
|||
if (req.r.rtm_family == AF_UNSPEC)
|
||||
req.r.rtm_family = AF_INET;
|
||||
|
||||
req.r.rtm_flags |= RTM_F_LOOKUP_TABLE;
|
||||
/* Only IPv4 supports the RTM_F_LOOKUP_TABLE flag */
|
||||
if (req.r.rtm_family == AF_INET)
|
||||
req.r.rtm_flags |= RTM_F_LOOKUP_TABLE;
|
||||
if (fib_match)
|
||||
req.r.rtm_flags |= RTM_F_FIB_MATCH;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue