summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorKalash Nainwal2019-02-21 01:23:04 +0100
committerGreg Kroah-Hartman2019-03-19 13:12:40 +0100
commitfe38cbc9e38a16407dcd566b34ebb98e150479aa (patch)
treede52d505c8c4d476e7019b1da819ed580d53daed /net
parentmdio_bus: Fix use-after-free on device_register fails (diff)
downloadkernel-qcow2-linux-fe38cbc9e38a16407dcd566b34ebb98e150479aa.tar.gz
kernel-qcow2-linux-fe38cbc9e38a16407dcd566b34ebb98e150479aa.tar.xz
kernel-qcow2-linux-fe38cbc9e38a16407dcd566b34ebb98e150479aa.zip
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 <kalash@arista.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net')
-rw-r--r--net/ipv6/route.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index ba59a9c14e02..619c4e90451e 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -4710,7 +4710,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;