summaryrefslogtreecommitdiffstats
path: root/bgpd/bgp_bfd.c
diff options
context:
space:
mode:
authorPhilippe Guibert <philippe.guibert@6wind.com>2019-03-26 14:29:13 +0100
committerPhilippe Guibert <philippe.guibert@6wind.com>2019-05-07 15:53:07 +0200
commit0945d5ed01a8a16e7f3be7ec15a640a2c61bc49f (patch)
treec2f16c26bf25dfd33bfb691c5dbecfec2d1eb587 /bgpd/bgp_bfd.c
parentbfdd: register to interfaces from other vrfs (diff)
downloadfrr-0945d5ed01a8a16e7f3be7ec15a640a2c61bc49f.tar.xz
frr-0945d5ed01a8a16e7f3be7ec15a640a2c61bc49f.zip
bgp, ospfd, ospf6d, pimd, lib, isisd: add bfd_client_sendmsg vrf_id
vrf_id parameter is added to the api of bfd_client_sendmsg(). this permits being registered to bfd from a separate vrf. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
Diffstat (limited to 'bgpd/bgp_bfd.c')
-rw-r--r--bgpd/bgp_bfd.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/bgpd/bgp_bfd.c b/bgpd/bgp_bfd.c
index 45e45977a..a9c30acaf 100644
--- a/bgpd/bgp_bfd.c
+++ b/bgpd/bgp_bfd.c
@@ -96,13 +96,12 @@ int bgp_bfd_is_peer_multihop(struct peer *peer)
static void bgp_bfd_peer_sendmsg(struct peer *peer, int command)
{
struct bfd_info *bfd_info;
- vrf_id_t vrf_id = VRF_DEFAULT;
int multihop;
+ vrf_id_t vrf_id;
bfd_info = (struct bfd_info *)peer->bfd_info;
- if (peer->bgp->inst_type == BGP_INSTANCE_TYPE_VRF)
- vrf_id = peer->bgp->vrf_id;
+ vrf_id = peer->bgp->vrf_id;
if (command == ZEBRA_BFD_DEST_DEREGISTER) {
multihop =
@@ -244,7 +243,7 @@ static int bgp_bfd_dest_replay(ZAPI_CALLBACK_ARGS)
zlog_debug("Zebra: BFD Dest replay request");
/* Send the client registration */
- bfd_client_sendmsg(zclient, ZEBRA_BFD_CLIENT_REGISTER);
+ bfd_client_sendmsg(zclient, ZEBRA_BFD_CLIENT_REGISTER, vrf_id);
/* Replay the peer, if BFD is enabled in BGP */