net: fib_notifier: propagate possible error during fib notifier registration

Unlike events for registered notifier, during the registration, the
errors that happened for the block being registered are not propagated
up to the caller. Make sure the error is propagated for FIB rules and
entries.

Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Jiri Pirko
2019-10-03 11:49:28 +02:00
committed by David S. Miller
parent 7c550daffe
commit 55c894f762
6 changed files with 71 additions and 35 deletions

View File

@@ -42,9 +42,7 @@ static int fib4_dump(struct net *net, struct notifier_block *nb)
if (err)
return err;
fib_notify(net, nb);
return 0;
return fib_notify(net, nb);
}
static const struct fib_notifier_ops fib4_notifier_ops_template = {