mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-03 08:56:13 +00:00
bfdd: add the vrf update hook in case vrf name changes
in case vrf name changes, use a hook to be notified about the vrf change. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
This commit is contained in:
parent
e0f36c91e2
commit
43ba41c1a3
12
bfdd/bfd.c
12
bfdd/bfd.c
@ -1630,6 +1630,16 @@ static int bfd_vrf_delete(struct vrf *vrf)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int bfd_vrf_update(struct vrf *vrf)
|
||||
{
|
||||
if (!vrf_is_enabled(vrf))
|
||||
return 0;
|
||||
log_debug("VRF update: %s(%u)", vrf->name, vrf->vrf_id);
|
||||
/* a different name is given; update bfd list */
|
||||
bfdd_sessions_enable_vrf(vrf);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int bfd_vrf_enable(struct vrf *vrf)
|
||||
{
|
||||
struct bfd_vrf_global *bvrf;
|
||||
@ -1715,7 +1725,7 @@ static int bfd_vrf_disable(struct vrf *vrf)
|
||||
void bfd_vrf_init(void)
|
||||
{
|
||||
vrf_init(bfd_vrf_new, bfd_vrf_enable, bfd_vrf_disable,
|
||||
bfd_vrf_delete, NULL);
|
||||
bfd_vrf_delete, bfd_vrf_update);
|
||||
}
|
||||
|
||||
void bfd_vrf_terminate(void)
|
||||
|
Loading…
Reference in New Issue
Block a user