]> git.proxmox.com Git - mirror_iproute2.git/blobdiff - ip/iproute.c
ip route: get: only set RTM_F_LOOKUP_TABLE flag for IPv4
[mirror_iproute2.git] / ip / iproute.c
index 0440366ee26a17c2c35b63ecb46ec1a37e4fe817..5f58a3b344061c991fef31df75f1cf29fa18a64b 100644 (file)
@@ -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;