forked from Mirror/frr
pimd: Prevent uninited usage of nexthop
pim_msdp_peer_rpf_check creates an nexthop to do a rpf search against and doesn't initialize it sucht that the pim_nexthop_lookup function is making decisions against the nexthop just created that was uninitialized. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
This commit is contained in:
parent
d0606e0a85
commit
b0a13ffb36
|
@ -720,7 +720,7 @@ static int pim_msdp_sa_comp(const void *p1, const void *p2)
|
|||
/* XXX: this can use a bit of refining and extensions */
|
||||
bool pim_msdp_peer_rpf_check(struct pim_msdp_peer *mp, struct in_addr rp)
|
||||
{
|
||||
struct pim_nexthop nexthop;
|
||||
struct pim_nexthop nexthop = {0};
|
||||
|
||||
if (mp->peer.s_addr == rp.s_addr) {
|
||||
return true;
|
||||
|
|
Loading…
Reference in a new issue