]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
nexthop: Pass extack to nexthop notifier
authorIdo Schimmel <idosch@nvidia.com>
Wed, 4 Nov 2020 13:30:24 +0000 (15:30 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 2 Oct 2025 11:35:46 +0000 (13:35 +0200)
[ Upstream commit 3578d53dcef152a460a2d560c95dcc4399ff04cd ]

The next patch will add extack to the notification info. This allows
listeners to veto notifications and communicate the reason to user space.

Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Reviewed-by: David Ahern <dsahern@gmail.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Stable-dep-of: 390b3a300d78 ("nexthop: Forbid FDB status change while nexthop is in a group")
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/ipv4/nexthop.c

index a508fd94b8be0bc0b818894d776d972e4ff653d9..0653aa518648ce742f486d4dfa5c81c631e08df3 100644 (file)
@@ -38,7 +38,8 @@ static const struct nla_policy rtm_nh_policy[NHA_MAX + 1] = {
 
 static int call_nexthop_notifiers(struct net *net,
                                  enum nexthop_event_type event_type,
-                                 struct nexthop *nh)
+                                 struct nexthop *nh,
+                                 struct netlink_ext_ack *extack)
 {
        int err;
 
@@ -908,7 +909,7 @@ static void __remove_nexthop(struct net *net, struct nexthop *nh,
 static void remove_nexthop(struct net *net, struct nexthop *nh,
                           struct nl_info *nlinfo)
 {
-       call_nexthop_notifiers(net, NEXTHOP_EVENT_DEL, nh);
+       call_nexthop_notifiers(net, NEXTHOP_EVENT_DEL, nh, NULL);
 
        /* remove from the tree */
        rb_erase(&nh->rb_node, &net->nexthop.rb_root);