From 2d32c49386cbb748ef775aab60aa687d4a320d3b Mon Sep 17 00:00:00 2001 From: Petr Machata Date: Fri, 8 Mar 2024 13:59:45 +0100 Subject: [PATCH] net: nexthop: Initialize NH group ID in resilient NH group notifiers The NEXTHOP_EVENT_RES_TABLE_PRE_REPLACE notifier currently keeps the group ID unset. That makes it impossible to look up the group for which the notifier is intended. This is not an issue at the moment, because the only client is netdevsim, and that just so that it veto replacements, which is a static property not tied to a particular group. But for any practical use, the ID is necessary. Set it. Signed-off-by: Petr Machata Reviewed-by: Ido Schimmel Link: https://lore.kernel.org/r/025fef095dcfb408042568bb5439da014d47239e.1709901020.git.petrm@nvidia.com Signed-off-by: Jakub Kicinski --- net/ipv4/nexthop.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/ipv4/nexthop.c b/net/ipv4/nexthop.c index 5eb3ba568f4e..aa1b36650282 100644 --- a/net/ipv4/nexthop.c +++ b/net/ipv4/nexthop.c @@ -407,6 +407,7 @@ static int call_nexthop_res_table_notifiers(struct net *net, struct nexthop *nh, struct nh_notifier_info info = { .net = net, .extack = extack, + .id = nh->id, }; struct nh_group *nhg; int err;