From: Jakub Kicinski Date: Sat, 12 Jan 2019 20:54:06 +0000 (-0800) Subject: ip route: get: only set RTM_F_LOOKUP_TABLE flag for IPv4 X-Git-Tag: v5.0.0~27 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8513f4a92657c0418043dafd9efdaa047b7f7132;p=thirdparty%2Fiproute2.git 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 Signed-off-by: Stephen Hemminger --- diff --git a/ip/iproute.c b/ip/iproute.c index 0440366ee..5f58a3b34 100644 --- a/ip/iproute.c +++ b/ip/iproute.c @@ -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;