Commit fe38cbc9 authored by Kalash Nainwal's avatar Kalash Nainwal Committed by Greg Kroah-Hartman

net: Set rtm_table to RT_TABLE_COMPAT for ipv6 for tables > 255

[ Upstream commit 97f0082a ]

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 709772e6 ("net: Fix routing tables with
id > 255 for legacy software").
Signed-off-by: default avatarKalash Nainwal <kalash@arista.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 96a3b144
...@@ -4710,7 +4710,7 @@ static int rt6_fill_node(struct net *net, struct sk_buff *skb, ...@@ -4710,7 +4710,7 @@ static int rt6_fill_node(struct net *net, struct sk_buff *skb,
table = rt->fib6_table->tb6_id; table = rt->fib6_table->tb6_id;
else else
table = RT6_TABLE_UNSPEC; 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)) if (nla_put_u32(skb, RTA_TABLE, table))
goto nla_put_failure; goto nla_put_failure;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment