pimd: uninitialized memory access fix

Signed-off-by: F. Aragon <paco@voltanet.io>
This commit is contained in:
F. Aragon 2018-07-24 18:46:38 +02:00
parent 79d702c130
commit 431f21d38e
No known key found for this signature in database
GPG key ID: FD112A8C7E6A5E4A

View file

@ -430,6 +430,9 @@ int pim_ecmp_nexthop_search(struct pim_instance *pim,
if (!pnc || !pnc->nexthop_num || !nexthop)
return 0;
memset(&nbrs, 0, sizeof(nbrs));
memset(&ifps, 0, sizeof(ifps));
// Current Nexthop is VALID, check to stay on the current path.
if (nexthop->interface && nexthop->interface->info
&& nexthop->mrib_nexthop_addr.u.prefix4.s_addr
@ -829,6 +832,9 @@ int pim_ecmp_nexthop_lookup(struct pim_instance *pim,
return 0;
}
memset(&nbrs, 0, sizeof(nbrs));
memset(&ifps, 0, sizeof(ifps));
/*
* Look up all interfaces and neighbors,
* store for later usage