summaryrefslogtreecommitdiff
path: root/zebra/zebra_mroute.c
diff options
context:
space:
mode:
authorpaulzlabn <paulz@labn.net>2018-03-14 13:31:58 -0700
committerGitHub <noreply@github.com>2018-03-14 13:31:58 -0700
commit3f1224cd1a9408bdad6aca8c0c205211cb548d5c (patch)
tree87e6a52a3e7ad7b09caa3207f081fd92bc8fd018 /zebra/zebra_mroute.c
parentfd9b55a2b77c187730600d429b3f290ab58fa035 (diff)
parent6ca96cc6ada990d052fcfc48cffeef454ae64a10 (diff)
Merge branch 'master' into working/master/bgp-vpn-vrf-leaking
Diffstat (limited to 'zebra/zebra_mroute.c')
-rw-r--r--zebra/zebra_mroute.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/zebra/zebra_mroute.c b/zebra/zebra_mroute.c
index e9cd19ebe0..042bd3769e 100644
--- a/zebra/zebra_mroute.c
+++ b/zebra/zebra_mroute.c
@@ -32,17 +32,16 @@
#include "zebra/rt.h"
#include "zebra/debug.h"
-int zebra_ipmr_route_stats(struct zserv *client, u_short length,
- struct zebra_vrf *zvrf)
+void zebra_ipmr_route_stats(ZAPI_HANDLER_ARGS)
{
struct mcast_route_data mroute;
struct stream *s;
int suc = -1;
memset(&mroute, 0, sizeof(mroute));
- STREAM_GET(&mroute.sg.src, client->ibuf, 4);
- STREAM_GET(&mroute.sg.grp, client->ibuf, 4);
- STREAM_GETL(client->ibuf, mroute.ifindex);
+ STREAM_GET(&mroute.sg.src, msg, 4);
+ STREAM_GET(&mroute.sg.grp, msg, 4);
+ STREAM_GETL(msg, mroute.ifindex);
if (IS_ZEBRA_DEBUG_KERNEL) {
char sbuf[40];
@@ -57,7 +56,7 @@ int zebra_ipmr_route_stats(struct zserv *client, u_short length,
suc = kernel_get_ipmr_sg_stats(zvrf, &mroute);
stream_failure:
- s = client->obuf;
+ s = stream_new(ZEBRA_MAX_PACKET_SIZ);
stream_reset(s);
@@ -68,6 +67,5 @@ stream_failure:
stream_putl(s, suc);
stream_putw_at(s, 0, stream_get_endp(s));
- zebra_server_send_message(client);
- return 0;
+ zebra_server_send_message(client, s);
}