From: Kalash Nainwal Date: Thu, 21 Feb 2019 00:23:04 +0000 (-0800) Subject: net: Set rtm_table to RT_TABLE_COMPAT for ipv6 for tables > 255 X-Git-Tag: v4.20.17~23 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=53ad69776e3223e2f6731a16525286686d1ac9b1;p=thirdparty%2Fkernel%2Fstable.git net: Set rtm_table to RT_TABLE_COMPAT for ipv6 for tables > 255 [ Upstream commit 97f0082a0592212fc15d4680f5a4d80f79a1687c ] 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 Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- diff --git a/net/ipv6/route.c b/net/ipv6/route.c index c87ce5732338c..a4ec629e15623 100644 --- a/net/ipv6/route.c +++ b/net/ipv6/route.c @@ -4660,7 +4660,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;