From 5bcc6b469cf01b91c32255b4fd33830ca0e222aa Mon Sep 17 00:00:00 2001 From: Rafael Zalamena Date: Fri, 29 Apr 2022 13:49:08 -0300 Subject: [PATCH] bgpd: fix interface name compare We always want to compare the whole string, lets not use `strncmp` for this case. Signed-off-by: Rafael Zalamena --- bgpd/bgpd.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bgpd/bgpd.h b/bgpd/bgpd.h index dfed9f2ae9..5bb5435683 100644 --- a/bgpd/bgpd.h +++ b/bgpd/bgpd.h @@ -2440,7 +2440,7 @@ static inline uint32_t bgp_vrf_interfaces(struct bgp *bgp, bool active) if (vrf == NULL) return 0; RB_FOREACH (ifp, if_name_head, &vrf->ifaces_by_name) { - if (strncmp(ifp->name, bgp->name, VRF_NAMSIZ) == 0) + if (strcmp(ifp->name, bgp->name) == 0) continue; if (!active || if_is_up(ifp)) count++;