* [PATCH] net: fib_rules: Correctly set table field when table number exceeds 8 bits
@ 2020-02-12 15:43 Jethro Beekman
2020-02-17 2:39 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Jethro Beekman @ 2020-02-12 15:43 UTC (permalink / raw)
To: David S. Miller, Jakub Kicinski, Jiri Pirko, Hangbin Liu,
Nathan Chancellor, Thomas Gleixner, Johannes Berg,
Jethro Beekman, netdev, linux-kernel
In 709772e6e06564ed94ba740de70185ac3d792773, 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>
---
net/core/fib_rules.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/core/fib_rules.c b/net/core/fib_rules.c
index 3e7e152..bd7eba9 100644
--- a/net/core/fib_rules.c
+++ b/net/core/fib_rules.c
@@ -974,7 +974,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))
--
2.7.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] net: fib_rules: Correctly set table field when table number exceeds 8 bits
2020-02-12 15:43 [PATCH] net: fib_rules: Correctly set table field when table number exceeds 8 bits Jethro Beekman
@ 2020-02-17 2:39 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2020-02-17 2:39 UTC (permalink / raw)
To: jethro
Cc: kuba, jiri, liuhangbin, natechancellor, tglx, johannes.berg,
netdev, linux-kernel
From: Jethro Beekman <jethro@fortanix.com>
Date: Wed, 12 Feb 2020 16:43:41 +0100
> In 709772e6e06564ed94ba740de70185ac3d792773, 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>
Applied and queued up for -stable.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-02-17 2:39 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-12 15:43 [PATCH] net: fib_rules: Correctly set table field when table number exceeds 8 bits Jethro Beekman
2020-02-17 2:39 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).