mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-17 21:38:11 +00:00
zebra: Remove strcpy from fast path
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
This commit is contained in:
parent
a57103e963
commit
7649a4f60c
@ -30,6 +30,7 @@
|
|||||||
#include "zebra/zebra_vrf.h"
|
#include "zebra/zebra_vrf.h"
|
||||||
#include "zebra/zebra_mroute.h"
|
#include "zebra/zebra_mroute.h"
|
||||||
#include "zebra/rt.h"
|
#include "zebra/rt.h"
|
||||||
|
#include "zebra/debug.h"
|
||||||
|
|
||||||
int zebra_ipmr_route_stats(struct zserv *client, int fd, u_short length,
|
int zebra_ipmr_route_stats(struct zserv *client, int fd, u_short length,
|
||||||
struct zebra_vrf *zvrf)
|
struct zebra_vrf *zvrf)
|
||||||
@ -38,16 +39,20 @@ int zebra_ipmr_route_stats(struct zserv *client, int fd, u_short length,
|
|||||||
struct stream *s;
|
struct stream *s;
|
||||||
int suc;
|
int suc;
|
||||||
|
|
||||||
char sbuf[40];
|
|
||||||
char gbuf[40];
|
|
||||||
|
|
||||||
memset(&mroute, 0, sizeof(mroute));
|
memset(&mroute, 0, sizeof(mroute));
|
||||||
stream_get(&mroute.sg.src, client->ibuf, 4);
|
stream_get(&mroute.sg.src, client->ibuf, 4);
|
||||||
stream_get(&mroute.sg.grp, client->ibuf, 4);
|
stream_get(&mroute.sg.grp, client->ibuf, 4);
|
||||||
mroute.ifindex = stream_getl(client->ibuf);
|
mroute.ifindex = stream_getl(client->ibuf);
|
||||||
|
|
||||||
strcpy(sbuf, inet_ntoa(mroute.sg.src));
|
if (IS_ZEBRA_DEBUG_KERNEL) {
|
||||||
strcpy(gbuf, inet_ntoa(mroute.sg.grp));
|
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);
|
suc = kernel_get_ipmr_sg_stats(&mroute);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user