diff options
author | Donald Sharp <sharpd@cumulusnetworks.com> | 2017-06-06 16:17:06 +0200 |
---|---|---|
committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2017-07-24 19:51:39 +0200 |
commit | 7649a4f60ca5022a6a056432d62b6a59263b9703 (patch) | |
tree | 4cd40f18f76148b569e15ea430ff8698051ae2de /zebra/zebra_mroute.c | |
parent | pimd: Cleanup some join debug messages (diff) | |
download | frr-7649a4f60ca5022a6a056432d62b6a59263b9703.tar.xz frr-7649a4f60ca5022a6a056432d62b6a59263b9703.zip |
zebra: Remove strcpy from fast path
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'zebra/zebra_mroute.c')
-rw-r--r-- | zebra/zebra_mroute.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/zebra/zebra_mroute.c b/zebra/zebra_mroute.c index c00498171..6b510f9d3 100644 --- a/zebra/zebra_mroute.c +++ b/zebra/zebra_mroute.c @@ -30,6 +30,7 @@ #include "zebra/zebra_vrf.h" #include "zebra/zebra_mroute.h" #include "zebra/rt.h" +#include "zebra/debug.h" int zebra_ipmr_route_stats(struct zserv *client, int fd, u_short length, struct zebra_vrf *zvrf) @@ -38,16 +39,20 @@ int zebra_ipmr_route_stats(struct zserv *client, int fd, u_short length, struct stream *s; int suc; - char sbuf[40]; - char gbuf[40]; - memset(&mroute, 0, sizeof(mroute)); stream_get(&mroute.sg.src, client->ibuf, 4); stream_get(&mroute.sg.grp, client->ibuf, 4); mroute.ifindex = stream_getl(client->ibuf); - strcpy(sbuf, inet_ntoa(mroute.sg.src)); - strcpy(gbuf, inet_ntoa(mroute.sg.grp)); + if (IS_ZEBRA_DEBUG_KERNEL) { + char sbuf[40]; + char gbuf[40]; + + strcpy(sbuf, inet_ntoa(mroute.sg.src)); + strcpy(gbuf, inet_ntoa(mroute.sg.grp)); + + zlog_debug("Asking for (%s,%s) mroute information", sbuf, gbuf); + } suc = kernel_get_ipmr_sg_stats(&mroute); |