nexthop: Emit a notification when a nexthop group is replaced
authorIdo Schimmel <idosch@nvidia.com>
Wed, 4 Nov 2020 13:30:30 +0000 (15:30 +0200)
committerJakub Kicinski <kuba@kernel.org>
Fri, 6 Nov 2020 19:28:49 +0000 (11:28 -0800)
commitd144cc5f4f4eaf0cd2e7a1a6369054da583f6c93
tree21ec23a53d5384ecaba20b5a8ac13fb55f9a1a73
parent732d167bf5f53a8c1e8c53cf7dbffe2a13f63752
nexthop: Emit a notification when a nexthop group is replaced

Emit a notification in the nexthop notification chain when an existing
nexthop group is replaced.

The notification is emitted after all the validation checks were
performed, but before the new configuration (i.e., 'struct nh_grp') is
pointed at by the old shell (i.e., 'struct nexthop'). This prevents the
need to perform rollback in case the notification is vetoed.

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