diff options
author | David S. Miller <davem@davemloft.net> | 2015-03-12 18:26:58 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-03-12 18:26:58 -0400 |
commit | 06741d055bb1a630f793e36a486a209698ea672b (patch) | |
tree | c3b581a4c65b4e1dcad5f76138c252608c558360 /net/ipv4/fib_frontend.c | |
parent | 80f1d68ccba70b1060c9c7360ca83da430f66bed (diff) | |
parent | 0b65bd97ba5fc2c43fa4d077e7420f3ec09a40b3 (diff) | |
download | linux-06741d055bb1a630f793e36a486a209698ea672b.tar.bz2 |
Merge branch 'fib_trie_table_merge_fixes'
Alexander Duyck says:
====================
fib_trie: Minor fixes for table merge
This patch set addresses two issues reported with the tables merged, the
first is a NULL pointer dereference, and the other is to remove a WARN_ON
and set the ordering for aliases from different tables with the same slen
values.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/fib_frontend.c')
-rw-r--r-- | net/ipv4/fib_frontend.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/net/ipv4/fib_frontend.c b/net/ipv4/fib_frontend.c index c1caf9ded280..e5b6b0534c5f 100644 --- a/net/ipv4/fib_frontend.c +++ b/net/ipv4/fib_frontend.c @@ -156,9 +156,12 @@ int fib_unmerge(struct net *net) { struct fib_table *old, *new; + /* attempt to fetch local table if it has been allocated */ old = fib_get_table(net, RT_TABLE_LOCAL); - new = fib_trie_unmerge(old); + if (!old) + return 0; + new = fib_trie_unmerge(old); if (!new) return -ENOMEM; |