diff options
Diffstat (limited to 'net/ipv4/fib_trie.c')
-rw-r--r-- | net/ipv4/fib_trie.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/net/ipv4/fib_trie.c b/net/ipv4/fib_trie.c index f84a0e90d675..4587d344046d 100644 --- a/net/ipv4/fib_trie.c +++ b/net/ipv4/fib_trie.c | |||
@@ -1656,7 +1656,12 @@ int fib_table_delete(struct fib_table *tb, struct fib_config *cfg) | |||
1656 | if (!l) | 1656 | if (!l) |
1657 | return -ESRCH; | 1657 | return -ESRCH; |
1658 | 1658 | ||
1659 | fa_head = get_fa_head(l, plen); | 1659 | li = find_leaf_info(l, plen); |
1660 | |||
1661 | if (!li) | ||
1662 | return -ESRCH; | ||
1663 | |||
1664 | fa_head = &li->falh; | ||
1660 | fa = fib_find_alias(fa_head, tos, 0); | 1665 | fa = fib_find_alias(fa_head, tos, 0); |
1661 | 1666 | ||
1662 | if (!fa) | 1667 | if (!fa) |
@@ -1692,9 +1697,6 @@ int fib_table_delete(struct fib_table *tb, struct fib_config *cfg) | |||
1692 | rtmsg_fib(RTM_DELROUTE, htonl(key), fa, plen, tb->tb_id, | 1697 | rtmsg_fib(RTM_DELROUTE, htonl(key), fa, plen, tb->tb_id, |
1693 | &cfg->fc_nlinfo, 0); | 1698 | &cfg->fc_nlinfo, 0); |
1694 | 1699 | ||
1695 | l = fib_find_node(t, key); | ||
1696 | li = find_leaf_info(l, plen); | ||
1697 | |||
1698 | list_del_rcu(&fa->fa_list); | 1700 | list_del_rcu(&fa->fa_list); |
1699 | 1701 | ||
1700 | if (!plen) | 1702 | if (!plen) |