diff mbox

[net-next,1/2] switchdev: fix CONFIG_IP_MULTIPLE_TABLES compile issue

Message ID 1425633277-32929-1-git-send-email-sfeldma@gmail.com
State Accepted, archived
Delegated to: David Miller
Headers show

Commit Message

Scott Feldman March 6, 2015, 9:14 a.m. UTC
From: Scott Feldman <sfeldma@gmail.com>

Signed-off-by: Scott Feldman <sfeldma@gmail.com>
---
 net/switchdev/switchdev.c |    8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

Comments

Jiri Pirko March 6, 2015, 11:49 a.m. UTC | #1
Fri, Mar 06, 2015 at 10:14:36AM CET, sfeldma@gmail.com wrote:
>From: Scott Feldman <sfeldma@gmail.com>
>
>Signed-off-by: Scott Feldman <sfeldma@gmail.com>


Acked-by: Jiri Pirko <jiri@resnulli.us>
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
David Miller March 6, 2015, 5:44 p.m. UTC | #2
From: sfeldma@gmail.com
Date: Fri,  6 Mar 2015 01:14:36 -0800

> From: Scott Feldman <sfeldma@gmail.com>
> 
> Signed-off-by: Scott Feldman <sfeldma@gmail.com>

Applied.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/net/switchdev/switchdev.c b/net/switchdev/switchdev.c
index f4fd575..19e4e72 100644
--- a/net/switchdev/switchdev.c
+++ b/net/switchdev/switchdev.c
@@ -309,8 +309,12 @@  int netdev_switch_fib_ipv4_add(u32 dst, int dst_len, struct fib_info *fi,
 	 * IPv4 FIB offloading has been disabled completely.
 	 */
 
-	if (fi->fib_net->ipv4.fib_has_custom_rules |
-	    fi->fib_net->ipv4.fib_offload_disabled)
+#ifdef CONFIG_IP_MULTIPLE_TABLES
+	if (fi->fib_net->ipv4.fib_has_custom_rules)
+		return 0;
+#endif
+
+	if (fi->fib_net->ipv4.fib_offload_disabled)
 		return 0;
 
 	dev = netdev_switch_get_dev_by_nhs(fi);