diff options
author | Michael Ellerman <mpe@ellerman.id.au> | 2019-01-04 14:07:47 +0300 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2019-01-04 14:07:47 +0300 |
commit | d538d94f0ca86cfedc892cc427169219acb3c2f7 (patch) | |
tree | 8363c4ff35907edb5245da737d7f6982bf22b945 /net/ipv4/fib_rules.c | |
parent | f460772291f8171988b2b60141a45706123d0c69 (diff) | |
parent | 96d4f267e40f9509e8a66e2b39e8b95655617693 (diff) | |
download | linux-d538d94f0ca86cfedc892cc427169219acb3c2f7.tar.xz |
Merge branch 'master' into fixes
We have a fix to apply on top of commit 96d4f267e40f ("Remove 'type'
argument from access_ok() function"), so merge master to get it.
Diffstat (limited to 'net/ipv4/fib_rules.c')
-rw-r--r-- | net/ipv4/fib_rules.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/net/ipv4/fib_rules.c b/net/ipv4/fib_rules.c index f8eb78d042a4..cfec3af54c8d 100644 --- a/net/ipv4/fib_rules.c +++ b/net/ipv4/fib_rules.c @@ -198,11 +198,15 @@ static int fib4_rule_match(struct fib_rule *rule, struct flowi *fl, int flags) static struct fib_table *fib_empty_table(struct net *net) { - u32 id; + u32 id = 1; - for (id = 1; id <= RT_TABLE_MAX; id++) + while (1) { if (!fib_get_table(net, id)) return fib_new_table(net, id); + + if (id++ == RT_TABLE_MAX) + break; + } return NULL; } |