summaryrefslogtreecommitdiffstats
path: root/pimd/pim_msdp.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@nvidia.com>2021-09-17 11:41:37 +0200
committerDonald Sharp <sharpd@nvidia.com>2021-09-21 13:54:54 +0200
commitb0a13ffb36c1696b2fb6575f1c279ba5729df044 (patch)
tree5c9ff0765a42fedffe6493dae32fb1c0c77c67d0 /pimd/pim_msdp.c
parentospf6d: Use appropriate integer size and more context for reason strings (diff)
downloadfrr-b0a13ffb36c1696b2fb6575f1c279ba5729df044.tar.xz
frr-b0a13ffb36c1696b2fb6575f1c279ba5729df044.zip
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>
Diffstat (limited to 'pimd/pim_msdp.c')
-rw-r--r--pimd/pim_msdp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/pimd/pim_msdp.c b/pimd/pim_msdp.c
index da8916ddb..ddba33ff9 100644
--- a/pimd/pim_msdp.c
+++ b/pimd/pim_msdp.c
@@ -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;