From: Arnd Bergmann <arnd@arndb.de>
To: "David S. Miller" <davem@davemloft.net>, David Ahern <dsahern@gmail.com>
Cc: Arnd Bergmann <arnd@arndb.de>,
Kirill Tkhai <ktkhai@virtuozzo.com>,
Christian Brauner <christian@brauner.io>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH net-next] rtnetlink: mpls: ip_valid_fib_dump_req() requires CONFIG_INET
Date: Tue, 9 Oct 2018 18:10:00 +0200 [thread overview]
Message-ID: <20181009161031.1003047-1-arnd@arndb.de> (raw)
The newly added call to ip_valid_fib_dump_req() causes a link error
in configurations that enable MPLS but not IPv4:
net/mpls/af_mpls.o: In function `mpls_dump_routes':
af_mpls.c:(.text+0xed0): undefined reference to `ip_valid_fib_dump_req'
With the added IS_ENABLED() check we get the previous behavior
back in that configuration, and skip the check.
Fixes: e8ba330ac0c5 ("rtnetlink: Update fib dumps for strict data checking")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
net/mpls/af_mpls.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/mpls/af_mpls.c b/net/mpls/af_mpls.c
index 7f891ffffc05..99ff6114d513 100644
--- a/net/mpls/af_mpls.c
+++ b/net/mpls/af_mpls.c
@@ -2041,7 +2041,7 @@ static int mpls_dump_routes(struct sk_buff *skb, struct netlink_callback *cb)
ASSERT_RTNL();
- if (cb->strict_check) {
+ if (IS_ENABLED(CONFIG_INET) && cb->strict_check) {
int err = ip_valid_fib_dump_req(nlh, cb->extack);
if (err < 0)
--
2.18.0
next reply other threads:[~2018-10-09 16:10 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-09 16:10 Arnd Bergmann [this message]
2018-10-09 16:21 ` [PATCH net-next] rtnetlink: mpls: ip_valid_fib_dump_req() requires CONFIG_INET David Ahern
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=20181009161031.1003047-1-arnd@arndb.de \
--to=arnd@arndb.de \
--cc=christian@brauner.io \
--cc=davem@davemloft.net \
--cc=dsahern@gmail.com \
--cc=ktkhai@virtuozzo.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox