Skip to content

Commit

Permalink
zebra: rtadv uses uninited data to sendmsg
Browse files Browse the repository at this point in the history
valgrind is complaining about this problem.
This fixes it.

Signed-off-by: Donald Sharp <[email protected]>
  • Loading branch information
donaldsharp committed Apr 10, 2024
1 parent 5ff9474 commit 4fb3364
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions zebra/rtadv.c
Original file line number Diff line number Diff line change
Expand Up @@ -184,13 +184,13 @@ static int rtadv_recv_packet(struct zebra_vrf *zvrf, int sock, uint8_t *buf,
static void rtadv_send_packet(int sock, struct interface *ifp,
enum ipv6_nd_suppress_ra_status stop)
{
struct msghdr msg;
struct iovec iov;
struct msghdr msg = { 0 };
struct iovec iov = { 0 };
struct cmsghdr *cmsgptr;
struct in6_pktinfo *pkt;
struct sockaddr_in6 addr;
unsigned char buf[RTADV_MSG_SIZE];
char adata[RTADV_ADATA_SIZE];
struct sockaddr_in6 addr = { 0 };
unsigned char buf[RTADV_MSG_SIZE] = { 0 };
char adata[RTADV_ADATA_SIZE] = { 0 };

struct nd_router_advert *rtadv;
int ret;
Expand Down

0 comments on commit 4fb3364

Please sign in to comment.