All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jakub Kicinski <jakub.kicinski@netronome.com>
To: stephen@networkplumber.org, dsahern@gmail.com
Cc: netdev@vger.kernel.org, oss-drivers@netronome.com,
	Jakub Kicinski <jakub.kicinski@netronome.com>
Subject: [PATCH iproute2] ip route: get: only set RTM_F_LOOKUP_TABLE flag for IPv4
Date: Sat, 12 Jan 2019 12:54:06 -0800	[thread overview]
Message-ID: <20190112205406.25698-1-jakub.kicinski@netronome.com> (raw)

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>
---
 ip/iproute.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/ip/iproute.c b/ip/iproute.c
index 0440366ee26a..5f58a3b34406 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;
 
-- 
2.19.2

             reply	other threads:[~2019-01-12 20:54 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-12 20:54 Jakub Kicinski [this message]
2019-01-14 16:05 ` [PATCH iproute2] ip route: get: only set RTM_F_LOOKUP_TABLE flag for IPv4 Stephen Hemminger
2019-01-14 16:29   ` David Ahern
2019-01-21  7:32     ` Ido Schimmel
2019-01-21 14:56       ` David Ahern
2019-01-22 16:32       ` David Ahern
2019-01-22 16:43         ` Ido Schimmel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190112205406.25698-1-jakub.kicinski@netronome.com \
    --to=jakub.kicinski@netronome.com \
    --cc=dsahern@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=oss-drivers@netronome.com \
    --cc=stephen@networkplumber.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.