diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index 047c47224dba5eee24de524334fcc24844198331..ce15dc4ccbfa0cc14233b1fe7842479726ffed5a 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -4665,7 +4665,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;