* [PATCH net-next] rtnetlink: mpls: ip_valid_fib_dump_req() requires CONFIG_INET
@ 2018-10-09 16:10 Arnd Bergmann
2018-10-09 16:21 ` David Ahern
0 siblings, 1 reply; 2+ messages in thread
From: Arnd Bergmann @ 2018-10-09 16:10 UTC (permalink / raw)
To: David S. Miller, David Ahern
Cc: Arnd Bergmann, Kirill Tkhai, Christian Brauner, netdev,
linux-kernel
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net-next] rtnetlink: mpls: ip_valid_fib_dump_req() requires CONFIG_INET
2018-10-09 16:10 [PATCH net-next] rtnetlink: mpls: ip_valid_fib_dump_req() requires CONFIG_INET Arnd Bergmann
@ 2018-10-09 16:21 ` David Ahern
0 siblings, 0 replies; 2+ messages in thread
From: David Ahern @ 2018-10-09 16:21 UTC (permalink / raw)
To: Arnd Bergmann, David S. Miller
Cc: Kirill Tkhai, Christian Brauner, netdev, linux-kernel
On 10/9/18 10:10 AM, Arnd Bergmann wrote:
> 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)
>
If INET is not defined then mpls will need its own valid_dump_req
function to ensure strict_check semantics are managed. I'll send a patch.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-10-09 16:21 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-10-09 16:10 [PATCH net-next] rtnetlink: mpls: ip_valid_fib_dump_req() requires CONFIG_INET Arnd Bergmann
2018-10-09 16:21 ` David Ahern
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox