diff mbox series

Set rtm_table to RT_TABLE_COMPAT for ipv6 for tables > 255

Message ID 20190221002304.GA24732@us178.sjc.aristanetworks.com
State Accepted
Delegated to: David Miller
Headers show
Series Set rtm_table to RT_TABLE_COMPAT for ipv6 for tables > 255 | expand

Commit Message

Kalash Nainwal Feb. 21, 2019, 12:23 a.m. UTC
Set rtm_table to RT_TABLE_COMPAT for ipv6 for tables > 255 to
keep legacy software happy. This is similar to what was done for
ipv4 in commit 709772e6e065 ("net: Fix routing tables with
id > 255 for legacy software").

Signed-off-by: Kalash Nainwal <kalash@arista.com>
---
 net/ipv6/route.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

David Miller Feb. 22, 2019, 11:22 p.m. UTC | #1
From: Kalash Nainwal <kalash@arista.com>
Date: Wed, 20 Feb 2019 16:23:04 -0800

> Set rtm_table to RT_TABLE_COMPAT for ipv6 for tables > 255 to
> keep legacy software happy. This is similar to what was done for
> ipv4 in commit 709772e6e065 ("net: Fix routing tables with
> id > 255 for legacy software").
> 
> Signed-off-by: Kalash Nainwal <kalash@arista.com>

Applied and queued up for -stable.
Kalash Nainwal Feb. 22, 2019, 11:28 p.m. UTC | #2
On Fri, Feb 22, 2019 at 3:22 PM David Miller <davem@davemloft.net> wrote:
>
> From: Kalash Nainwal <kalash@arista.com>
> Date: Wed, 20 Feb 2019 16:23:04 -0800
>
> > Set rtm_table to RT_TABLE_COMPAT for ipv6 for tables > 255 to
> > keep legacy software happy. This is similar to what was done for
> > ipv4 in commit 709772e6e065 ("net: Fix routing tables with
> > id > 255 for legacy software").
> >
> > Signed-off-by: Kalash Nainwal <kalash@arista.com>
>
> Applied and queued up for -stable.

Thanks Dave.
diff mbox series

Patch

diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index 964491cf3672..77c07b2943f5 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -4649,7 +4649,7 @@  static int rt6_fill_node(struct net *net, struct sk_buff *skb,
 		table = rt->fib6_table->tb6_id;
 	else
 		table = RT6_TABLE_UNSPEC;
-	rtm->rtm_table = table;
+	rtm->rtm_table = table < 256 ? table : RT_TABLE_COMPAT;
 	if (nla_put_u32(skb, RTA_TABLE, table))
 		goto nla_put_failure;