提交 b47b2ec1 编写于 作者: H Herbert Xu 提交者: David S. Miller

[IPV4]: Fix error handling for fib_insert_node call

The error handling around fib_insert_node was broken because we always
zeroed the error before checking it.
Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 4b260a98
......@@ -1252,8 +1252,8 @@ fn_trie_insert(struct fib_table *tb, struct rtmsg *r, struct kern_rta *rta,
*/
if (!fa_head) {
fa_head = fib_insert_node(t, &err, key, plen);
err = 0;
fa_head = fib_insert_node(t, &err, key, plen);
if (err)
goto out_free_new_fa;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册