From 721eba0047ff4c25a05034b66008d67931bd5650 Mon Sep 17 00:00:00 2001 From: Donatas Abraitis Date: Tue, 18 Jul 2023 20:45:47 +0300 Subject: [PATCH] bgpd: Initialize bgp_nht_ifp_table_handle() bools Assuming field 'ifindex_ipv6_ll' is not equal to field 'ifindex', then nhop_found is just a garbage, let's avoid that. Signed-off-by: Donatas Abraitis --- bgpd/bgp_nht.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bgpd/bgp_nht.c b/bgpd/bgp_nht.c index ba95df7d17..02cfd9c2af 100644 --- a/bgpd/bgp_nht.c +++ b/bgpd/bgp_nht.c @@ -719,8 +719,8 @@ static void bgp_nht_ifp_table_handle(struct bgp *bgp, struct bgp_nexthop_cache *bnc; struct nexthop *nhop; uint8_t other_nh_count; - bool nhop_ll_found; - bool nhop_found; + bool nhop_ll_found = false; + bool nhop_found = false; if (ifp->ifindex == IFINDEX_INTERNAL) { zlog_warn("%s: The interface %s ignored", __func__, ifp->name); -- 2.39.5