nexthop: Pass extack to nexthop notifier
authorIdo Schimmel <idosch@nvidia.com>
Wed, 4 Nov 2020 13:30:24 +0000 (15:30 +0200)
committerJakub Kicinski <kuba@kernel.org>
Fri, 6 Nov 2020 19:28:48 +0000 (11:28 -0800)
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>
net/ipv4/nexthop.c

index 0dc43ad28eb95a6d0cb422d76a0cacd0ab2ec3a3..f677cb12fd5651780e0c7c0b0de9985fb5e61801 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;
 
@@ -907,7 +908,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);