nsim_fib_set_max_all(data, devlink);
data->fib_nb.notifier_call = nsim_fib_event_nb;
- err = register_fib_notifier(&init_net, &data->fib_nb,
+ err = register_fib_notifier(devlink_net(devlink), &data->fib_nb,
nsim_fib_dump_inconsistent, extack);
if (err) {
pr_err("Failed to register fib notifier\n");
NSIM_RESOURCE_IPV4_FIB_RULES);
devlink_resource_occ_get_unregister(devlink,
NSIM_RESOURCE_IPV4_FIB);
- unregister_fib_notifier(&init_net, &data->fib_nb);
+ unregister_fib_notifier(devlink_net(devlink), &data->fib_nb);
kfree(data);
}