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 <rzalamena@opensourcerouting.org>
This commit is contained in:
Rafael Zalamena 2022-04-29 13:49:08 -03:00
parent de416e6782
commit 5bcc6b469c

View File

@ -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++;