summaryrefslogtreecommitdiffstats
path: root/eigrpd
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@nvidia.com>2021-01-30 19:38:32 +0100
committerDonald Sharp <sharpd@nvidia.com>2021-01-30 19:38:32 +0100
commitde8b27a6cc67e45cb55894c2eebba8ee21a780b6 (patch)
tree59895c109c5a34ca922dbe23499d59d72b7542bf /eigrpd
parentMerge pull request #7953 from mjstapp/fix_more_ntoa (diff)
downloadfrr-de8b27a6cc67e45cb55894c2eebba8ee21a780b6.tar.xz
frr-de8b27a6cc67e45cb55894c2eebba8ee21a780b6.zip
eigrpd: Prevent uninitialized value from being used
valgrind is finding: 2141982-==2141982== Conditional jump or move depends on uninitialised value(s) 2141982:==2141982== at 0x11A7A6: eigrp_metrics_is_same (eigrp_metric.c:134) 2141982-==2141982== by 0x120360: eigrp_topology_update_distance (eigrp_topology.c:374) 2141982-==2141982== by 0x124F01: eigrp_get_fsm_event (eigrp_fsm.c:284) 2141982-==2141982== by 0x12519E: eigrp_fsm_event (eigrp_fsm.c:419) 2141982-==2141982== by 0x1206A1: eigrp_topology_neighbor_down (eigrp_topology.c:518) 2141982-==2141982== by 0x11AB3A: eigrp_nbr_delete (eigrp_neighbor.c:178) 2141982-==2141982== by 0x124494: eigrp_finish_final (eigrpd.c:271) 2141982-==2141982== by 0x1245A8: eigrp_finish (eigrpd.c:247) 2141982-==2141982== by 0x124630: eigrp_terminate (eigrpd.c:240) 2141982-==2141982== by 0x11344B: sigint (eigrp_main.c:112) 2141982-==2141982== by 0x48F5F32: quagga_sigevent_process (sigevent.c:130) Prevent this from happening. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Diffstat (limited to 'eigrpd')
-rw-r--r--eigrpd/eigrp_topology.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/eigrpd/eigrp_topology.c b/eigrpd/eigrp_topology.c
index 1b7e9fc15..6da7756f8 100644
--- a/eigrpd/eigrp_topology.c
+++ b/eigrpd/eigrp_topology.c
@@ -508,6 +508,7 @@ void eigrp_topology_neighbor_down(struct eigrp *eigrp,
if (entry->adv_router != nbr)
continue;
+ memset(&msg, 0, sizeof(msg));
msg.metrics.delay = EIGRP_MAX_METRIC;
msg.packet_type = EIGRP_OPC_UPDATE;
msg.eigrp = eigrp;