mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-15 16:24:13 +08:00
net: fib_rules: Correctly set table field when table number exceeds 8 bits
[ Upstream commit540e585a79
] In709772e6e0
, RT_TABLE_COMPAT was added to allow legacy software to deal with routing table numbers >= 256, but the same change to FIB rule queries was overlooked. Signed-off-by: Jethro Beekman <jethro@fortanix.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
59b5714c67
commit
9310357f61
@ -967,7 +967,7 @@ static int fib_nl_fill_rule(struct sk_buff *skb, struct fib_rule *rule,
|
||||
|
||||
frh = nlmsg_data(nlh);
|
||||
frh->family = ops->family;
|
||||
frh->table = rule->table;
|
||||
frh->table = rule->table < 256 ? rule->table : RT_TABLE_COMPAT;
|
||||
if (nla_put_u32(skb, FRA_TABLE, rule->table))
|
||||
goto nla_put_failure;
|
||||
if (nla_put_u32(skb, FRA_SUPPRESS_PREFIXLEN, rule->suppress_prefixlen))
|
||||
|
Loading…
Reference in New Issue
Block a user