Commit b47b2ec1 authored by Herbert Xu's avatar Herbert Xu Committed by 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: default avatarHerbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 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%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment