OSDN Git Service

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

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

The next patch will also emit a replace notification for all the nexthop
groups in which the nexthop is used.

Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/ipv4/nexthop.c