summaryrefslogtreecommitdiffstats
path: root/lib
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 /lib
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 'lib')
-rw-r--r--lib/bfd.c5
-rw-r--r--lib/bfd.h3
2 files changed, 5 insertions, 3 deletions
diff --git a/lib/bfd.c b/lib/bfd.c
index 7e27a64de..a8956c315 100644
--- a/lib/bfd.c
+++ b/lib/bfd.c
@@ -433,7 +433,8 @@ void bfd_show_info(struct vty *vty, struct bfd_info *bfd_info, int multihop,
* bfd_client_sendmsg - Format and send a client register
* command to Zebra to be forwarded to BFD
*/
-void bfd_client_sendmsg(struct zclient *zclient, int command)
+void bfd_client_sendmsg(struct zclient *zclient, int command,
+ vrf_id_t vrf_id)
{
struct stream *s;
int ret;
@@ -450,7 +451,7 @@ void bfd_client_sendmsg(struct zclient *zclient, int command)
s = zclient->obuf;
stream_reset(s);
- zclient_create_header(s, command, VRF_DEFAULT);
+ zclient_create_header(s, command, vrf_id);
stream_putl(s, getpid());
diff --git a/lib/bfd.h b/lib/bfd.h
index a93875c4c..d02110a99 100644
--- a/lib/bfd.h
+++ b/lib/bfd.h
@@ -102,7 +102,8 @@ extern void bfd_show_info(struct vty *vty, struct bfd_info *bfd_info,
int multihop, int extra_space, bool use_json,
json_object *json_obj);
-extern void bfd_client_sendmsg(struct zclient *zclient, int command);
+extern void bfd_client_sendmsg(struct zclient *zclient, int command,
+ vrf_id_t vrf_id);
extern void bfd_gbl_init(void);