From c3bd894e4d2395d2bc72b0d7a94984f04e93adb1 Mon Sep 17 00:00:00 2001 From: Quentin Young Date: Tue, 5 Feb 2019 22:02:40 +0000 Subject: vrrpd: protodown macvlan in backup state Signed-off-by: Quentin Young --- lib/zclient.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'lib/zclient.c') diff --git a/lib/zclient.c b/lib/zclient.c index 96a78efad6..6647a1ab18 100644 --- a/lib/zclient.c +++ b/lib/zclient.c @@ -555,6 +555,25 @@ void zclient_send_interface_radv_req(struct zclient *zclient, vrf_id_t vrf_id, zclient_send_message(zclient); } +int zclient_send_interface_protodown(struct zclient *zclient, vrf_id_t vrf_id, + struct interface *ifp, bool down) +{ + struct stream *s; + + if (zclient->sock < 0) + return -1; + + s = zclient->obuf; + stream_reset(s); + zclient_create_header(s, ZEBRA_INTERFACE_SET_PROTODOWN, vrf_id); + stream_putl(s, ifp->ifindex); + stream_putc(s, !!down); + stream_putw_at(s, 0, stream_get_endp(s)); + zclient_send_message(zclient); + + return 0; +} + /* Make connection to zebra daemon. */ int zclient_start(struct zclient *zclient) { -- cgit v1.2.3