aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander V. Chernikov <melifaro@FreeBSD.org>2021-03-20 08:26:03 +0000
committerAlexander V. Chernikov <melifaro@FreeBSD.org>2021-03-20 08:26:03 +0000
commit6f43c72b472ee78e04f1ebd347ca0ae7787ee876 (patch)
tree58041ae45d960e6defd0f054a7ed39cd5b7c3d54
parent3a314eb5bb444ec019457e5aefaabb656fcb3d54 (diff)
downloadsrc-6f43c72b472ee78e04f1ebd347ca0ae7787ee876.tar.gz
src-6f43c72b472ee78e04f1ebd347ca0ae7787ee876.zip
Zero `struct weightened_nhop` fields in nhgrp_get_addition_group().
`struct weightened_nhop` has spare 32bit between the fields due to the alignment (on amd64). Not zeroing these spare bits results in duplicating nhop groups in the kernel due to the way how comparison works. MFC after: 1 day
-rw-r--r--sys/net/route/nhgrp_ctl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/net/route/nhgrp_ctl.c b/sys/net/route/nhgrp_ctl.c
index b329b907144f..b228c3bcee37 100644
--- a/sys/net/route/nhgrp_ctl.c
+++ b/sys/net/route/nhgrp_ctl.c
@@ -646,7 +646,7 @@ nhgrp_get_addition_group(struct rib_head *rh, struct route_nhop_data *rnd_orig,
{
struct nh_control *ctl = rh->nh_control;
struct nhgrp_priv *nhg_priv;
- struct weightened_nhop wn[2];
+ struct weightened_nhop wn[2] = {};
int error;
if (rnd_orig->rnd_nhop == NULL) {