mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-05 02:46:37 +00:00
bfdd: register to interfaces from other vrfs
registration for new interfaces is done. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
This commit is contained in:
parent
45b000d085
commit
54aadda13d
@ -1502,6 +1502,9 @@ static int bfd_vrf_enable(struct vrf *vrf)
|
||||
if (!bvrf->bg_ev[5])
|
||||
thread_add_read(master, bfd_recv_cb, bvrf, bvrf->bg_echov6,
|
||||
&bvrf->bg_ev[5]);
|
||||
|
||||
if (vrf->vrf_id != VRF_DEFAULT)
|
||||
bfdd_zclient_register(vrf->vrf_id);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -1512,6 +1515,10 @@ static int bfd_vrf_disable(struct vrf *vrf)
|
||||
if (!vrf->info)
|
||||
return 0;
|
||||
bvrf = vrf->info;
|
||||
|
||||
if (vrf->vrf_id != VRF_DEFAULT)
|
||||
bfdd_zclient_unregister(vrf->vrf_id);
|
||||
|
||||
log_debug("VRF disable %s id %d", vrf->name, vrf->vrf_id);
|
||||
/* Close all descriptors. */
|
||||
socket_close(&bvrf->bg_echo);
|
||||
|
@ -586,6 +586,8 @@ void bfdd_vty_init(void);
|
||||
*/
|
||||
void bfdd_zclient_init(struct zebra_privs_t *bfdd_priv);
|
||||
void bfdd_zclient_stop(void);
|
||||
void bfdd_zclient_unregister(vrf_id_t vrf_id);
|
||||
void bfdd_zclient_register(vrf_id_t vrf_id);
|
||||
|
||||
int ptm_bfd_notify(struct bfd_session *bs);
|
||||
|
||||
|
@ -716,6 +716,20 @@ void bfdd_zclient_init(struct zebra_privs_t *bfdd_priv)
|
||||
zclient->interface_address_delete = bfdd_interface_address_update;
|
||||
}
|
||||
|
||||
void bfdd_zclient_register(vrf_id_t vrf_id)
|
||||
{
|
||||
if (!zclient || zclient->sock < 0)
|
||||
return;
|
||||
zclient_send_reg_requests(zclient, vrf_id);
|
||||
}
|
||||
|
||||
void bfdd_zclient_unregister(vrf_id_t vrf_id)
|
||||
{
|
||||
if (!zclient || zclient->sock < 0)
|
||||
return;
|
||||
zclient_send_dereg_requests(zclient, vrf_id);
|
||||
}
|
||||
|
||||
void bfdd_zclient_stop(void)
|
||||
{
|
||||
zclient_stop(zclient);
|
||||
|
Loading…
Reference in New Issue
Block a user